<apeiros>
you know you don't want to match a ), so tell the regex precisely that
<apeiros>
[^)]* is everything except )
<Scriptonaut>
anyone know why it would only return the last command rather than the entire hash?
<polpak>
alternatively you can use ? to make the . non-greedy
<apeiros>
(may have to escape the ) -> [^\)]*)
<apeiros>
?guy Scriptonaut
<ruboto>
Scriptonaut, I don't know anything about guy
<apeiros>
?guys Scriptonaut
<ruboto>
Scriptonaut, You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folks", "y'all" or "everyone" instead?
<apeiros>
Scriptonaut: a hash can't have the same key multiple times
<Scriptonaut>
ahhh
<Scriptonaut>
that's why, thanks
<apeiros>
you can use an array
<Scriptonaut>
also, it's excluding the !command, is ! a special char or something?
theery has joined #ruby
<i8igmac>
[^\)]*) i dont know what this represents
<i8igmac>
"(size 85 GB) and some junk (junk)".scan(/[^\)]*)/)
<apeiros>
! stuff is used to tell yaml how to deserialize iirc
<apeiros>
for non-native datatypes
banister has joined #ruby
<zenspider>
in yaml? ! is a type decl... you prolly need quotes around that stuff?
<Scriptonaut>
ah, thanks
<apeiros>
i8igmac: I just told you what it represents? I suggest you scroll back and read?
snockerton has quit [Quit: Leaving.]
<zenspider>
it's all redundant anyhow. just remove them
jeramyRR has left #ruby ["Peace out!"]
marr has quit [Ping timeout: 244 seconds]
theery has quit [Remote host closed the connection]
mikecmpbll has quit [Quit:
<polpak>
>>> "(size 85 GB) and some junk (junk)".scan /\(size.*?\)/ # i8igmac
<ruboto>
polpak # => /tmp/execpad-373340185978/source-373340185978:2: syntax error, unexpected '>' ...check link for more (https://eval.in/408643)
<polpak>
>> "(size 85 GB) and some junk (junk)".scan /\(size.*?\)/ # i8igmac
<Scriptonaut>
The error I get is: Psych::SyntaxError: (config/commands.yml): did not find expected ',' or '}' while parsing a flow mapping at line 2 column 3
lwu_ has quit [Quit: This computer has gone to sleep]
<zenspider>
that's not yaml, that's json. I don't remember which is the subset of the other.
lwu_ has joined #ruby
<zenspider>
that's also just plain valid ruby. You could do a YAML.dump with it to format it correctly
<Scriptonaut>
this thing says you can make hashes like that
<Antiarc>
json is a subset of yaml
chadwtaylor has quit [Remote host closed the connection]
zenguy_pc has quit [Read error: Connection reset by peer]
<zenspider>
thought so, but I always get those confused...
zenguy_pc has joined #ruby
fenjamin has joined #ruby
drewo has quit [Quit: WeeChat 0.4.2]
polpak has quit [Quit: leaving]
blaines has joined #ruby
<apeiros>
Scriptonaut: on a single line…
<apeiros>
Scriptonaut: build the structure in ruby, use puts data.to_yaml, see how it looks, build from that
howdoi has joined #ruby
freeze has quit [Ping timeout: 265 seconds]
havenwood has quit [Read error: Connection reset by peer]
ishahnaz has joined #ruby
drug has joined #ruby
drug has left #ruby ["As I often say, we have come a long way from the days of slavery, but in 2015, discrimination and inequality still saturate our society in modern ways. Though racism may be less blatant now in many cases, its existence is undeniable."]
dimasg has joined #ruby
arescorpio has joined #ruby
FernandoBasso has quit [Quit: May the force be with you.]
Azure has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
vdamewood has quit [Ping timeout: 240 seconds]
zenguy_pc has joined #ruby
aaeron has quit [Quit: Leaving.]
<BraddPitt>
test
<BraddPitt>
well neat
freeze has joined #ruby
aaeron has joined #ruby
Tamae has joined #ruby
Oka has joined #ruby
zenguy_pc has quit [Read error: No route to host]
jackjackdripper has quit [Quit: Leaving.]
diegoviola has joined #ruby
zenguy_pc has joined #ruby
PhantomSpank has joined #ruby
juanpaucar has joined #ruby
Channel6 has joined #ruby
tjbiddle has joined #ruby
failshell has joined #ruby
leesharma has quit [Ping timeout: 246 seconds]
yqt has quit [Ping timeout: 265 seconds]
<zenspider>
Dude. loved you in 12 monkeys.
<BraddPitt>
Thank you sir
pengin has quit [Remote host closed the connection]
Vile` has quit [Ping timeout: 240 seconds]
triangles has joined #ruby
n_blownapart has joined #ruby
theery has joined #ruby
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Vile` has joined #ruby
failshell has quit [Ping timeout: 265 seconds]
meph has quit [Remote host closed the connection]
oo_ has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
arturmartins has quit [Quit: Leaving...]
davedev2_ has joined #ruby
sankaber has joined #ruby
nikhgupta has joined #ruby
davedev2_ has quit [Read error: Connection reset by peer]
davedev2_ has joined #ruby
theery has quit [Remote host closed the connection]
davedev24 has quit [Ping timeout: 272 seconds]
hfp has quit [Ping timeout: 246 seconds]
hfp_work has quit [Ping timeout: 246 seconds]
benlieb has quit [Quit: benlieb]
towski_ has quit [Quit: Leaving...]
tubuliferous has joined #ruby
hfp has joined #ruby
hfp_work has joined #ruby
PaulCape_ has quit [Quit: .]
PaulCapestany has joined #ruby
n_blownapart has quit []
dimasg has quit [Ping timeout: 240 seconds]
tubuliferous has quit [Ping timeout: 265 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jcoe has joined #ruby
jcoe has quit [Client Quit]
mercwithamouth has quit [Ping timeout: 250 seconds]
xxneolithicxx has joined #ruby
nveselinov has quit [Quit: Connection closed for inactivity]
tkuchiki has joined #ruby
sankaber has quit [Ping timeout: 264 seconds]
houhoulis has quit [Remote host closed the connection]
omegamike has joined #ruby
lampshades has joined #ruby
n008f4g_ has quit [Ping timeout: 246 seconds]
bricker has quit [Ping timeout: 265 seconds]
avocadorivalry has quit [Quit: avocadorivalry]
mercwithamouth has joined #ruby
failshell has joined #ruby
cornerma1 has joined #ruby
omegamike has quit [Ping timeout: 256 seconds]
werelivinginthef has joined #ruby
aaeron has quit [Quit: Leaving.]
jenrzzz has quit [Ping timeout: 255 seconds]
Oka has quit [Quit: さようなら]
Oka has joined #ruby
cornerman has quit [Ping timeout: 240 seconds]
cornerma1 is now known as cornerman
niiamon has joined #ruby
blaines has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
A124 has quit [Ping timeout: 264 seconds]
ivanskie has joined #ruby
oo_ has quit [Remote host closed the connection]
Musashi007 has joined #ruby
tmtwd has quit [Ping timeout: 255 seconds]
fabrice31 has joined #ruby
bronson has quit [Remote host closed the connection]
niiamon has quit [Ping timeout: 255 seconds]
Oka has quit [Quit: さようなら]
Oka has joined #ruby
tmtwd has joined #ruby
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
rhg135 is now known as notrhg135
oo_ has joined #ruby
neoseeker has joined #ruby
fabrice31 has quit [Ping timeout: 246 seconds]
notrhg135 is now known as ascension
towski_ has joined #ruby
ascension is now known as RivetingHungerGu
dopie has joined #ruby
aaeron has joined #ruby
RivetingHungerGu is now known as rhg136
marens has quit [Quit: No Ping reply in 180 seconds.]
mercwithamouth has quit [Ping timeout: 255 seconds]
tmtwd has quit [Ping timeout: 244 seconds]
leesharma has joined #ruby
Feyn has quit [Ping timeout: 246 seconds]
tuelz has quit [Ping timeout: 240 seconds]
nikhgupta has quit [Remote host closed the connection]
juanpaucar has quit [Remote host closed the connection]
<al2o3-cr>
If the increment generates a ``carry,'' the character to the left of
<al2o3-cr>
it is incremented. This process repeats until there is no carry,
<al2o3-cr>
adding an additional character if necessary.
<al2o3-cr>
yy
tmtwd has joined #ruby
<al2o3-cr>
whoops
tkuchiki has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
tkuchiki has joined #ruby
<shevy>
you are a vimster al2o3-cr?
<al2o3-cr>
hmm, yep :)_
<zenspider>
Ox0dea: wierd. look at the to_a of the latter one. kinda makes sense, but doesn't
modern has quit []
CloCkWeRX has left #ruby [#ruby]
dimasg has quit [Ping timeout: 272 seconds]
Musashi007 has quit [Ping timeout: 272 seconds]
tmtwd has quit [Ping timeout: 264 seconds]
tkuchiki has quit [Remote host closed the connection]
dstarh has joined #ruby
user1138 has joined #ruby
dimasg has joined #ruby
jcdesimp has joined #ruby
curses has joined #ruby
tkuchiki has joined #ruby
yfeldblum has quit [Remote host closed the connection]
bootstrappm has left #ruby [#ruby]
dfockler has joined #ruby
leesharma has joined #ruby
curses has quit [Ping timeout: 256 seconds]
Yiota has joined #ruby
WildBamboo-Josh has quit [Quit: Leaving]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ishahnaz has quit []
tuelz has quit [Ping timeout: 240 seconds]
dorei has quit []
dfockler has quit [Ping timeout: 246 seconds]
Stratege_ has joined #ruby
michael_mbp has quit [Excess Flood]
tkuchiki has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
omegamike has joined #ruby
Stratege has quit [Ping timeout: 264 seconds]
towski_ has quit [Remote host closed the connection]
swgillespie has joined #ruby
casadei_ has joined #ruby
texasmade has joined #ruby
michael_mbp has joined #ruby
mercwithamouth has joined #ruby
chadwtaylor has quit [Quit: Leaving...]
ivanskie has joined #ruby
allcentury has quit [Ping timeout: 240 seconds]
tkuchiki has joined #ruby
omegamike has quit [Ping timeout: 264 seconds]
texasmade has quit [Ping timeout: 240 seconds]
werelivinginthef has quit [Remote host closed the connection]
Rickmasta has quit [Ping timeout: 244 seconds]
tjohnson has quit [Quit: Connection closed for inactivity]
niiamon has joined #ruby
tkuchiki has quit [Remote host closed the connection]
dimasg has quit [Ping timeout: 255 seconds]
bronson has joined #ruby
niiamon has quit [Ping timeout: 256 seconds]
Rickmasta has joined #ruby
tejasmanohar_ has joined #ruby
sarkyniin has quit [Quit: Quit]
phutchins has quit [Ping timeout: 244 seconds]
mercwithamouth has quit [Ping timeout: 246 seconds]
GriffinHeart has joined #ruby
failshell has quit [Remote host closed the connection]
juanpablo______ has joined #ruby
aaeron has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
bronson has quit [Ping timeout: 240 seconds]
phutchins has joined #ruby
RobertBirnie has joined #ruby
theery has joined #ruby
Stratege_ has left #ruby [#ruby]
juanpablo______ has quit [Ping timeout: 244 seconds]
theery has quit [Remote host closed the connection]
PhantomS_ has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
yfeldblum has joined #ruby
PhantomSpank has quit [Ping timeout: 244 seconds]
phutchins has quit [Ping timeout: 260 seconds]
towski_ has joined #ruby
CorySimmons has joined #ruby
bruno- has joined #ruby
riscky has joined #ruby
workmad3 has joined #ruby
aaeron has quit [Ping timeout: 246 seconds]
<busterarm>
note to self
<busterarm>
don't write posts about how you hate a company's service on the internet. They might contact you out of the blue and ask you to interview with them.
sevenseacat has joined #ruby
<Aeyrix>
busterarm: heh
<Aeyrix>
busterarm: Did that myself.
<Aeyrix>
Didn't get interviewed, but I have a feeling it contributed to the denied service.
<busterarm>
I mean, I have a well reasoned argument about why I dislike their service _here_
<busterarm>
They're great in other places
<Aeyrix>
rm'd it eventually
bruno- has quit [Ping timeout: 240 seconds]
<busterarm>
oh. heh. Well, I didn't apply to work there - they contacted me
<busterarm>
it's too late to remove - it's on HackerNews
<Aeyrix>
i c
<Aeyrix>
Hah.
<Aeyrix>
I can't tell whether I like or detest HN.
<busterarm>
which is coincidentally the same place they found out about me (my Who's Hiring post last month)
<busterarm>
i'm in hysterics over the irony
workmad3 has quit [Ping timeout: 264 seconds]
CorySimmons has quit [Quit: Bye!]
Scriptonaut has quit [Ping timeout: 244 seconds]
<busterarm>
it might be one of those things where I contact HN staff and be like "hey, this post might cost me my job some day, can you delete it?"
aaeron has joined #ruby
hoelzro has quit [Ping timeout: 256 seconds]
<Aeyrix>
heh i guess it's based on how you wrote the post
<Aeyrix>
but i doubt it
hoelzro has joined #ruby
Scriptonaut has joined #ruby
<busterarm>
if I took a job from them...(probably won't)
diegoviola has quit [Remote host closed the connection]
<busterarm>
i certainly want to interview with them though so I can leverage an offer with other places I'm interviewing with
tubuliferous has joined #ruby
<busterarm>
it's an extremely well known company -.-
<Aeyrix>
nice
avocadorivalry has joined #ruby
shortdudey123 has quit [Excess Flood]
shortdudey123 has joined #ruby
ruby-lang029 has joined #ruby
tubuliferous has quit [Ping timeout: 244 seconds]
tkuchiki has joined #ruby
christiandsg has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
freerobby has joined #ruby
Yzguy has quit [Quit: Zzz...]
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leesharma has joined #ruby
_Mercurial has joined #ruby
rbowlby has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 244 seconds]
gix has quit [Quit: Client exiting]
freerobby has quit [Quit: Leaving.]
ruby-lang029 has quit [Ping timeout: 246 seconds]
theery has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<zenspider>
why does pry have to spew 400 lines of warnings if a load it and have -w on?
modern has joined #ruby
modern has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
iateadonut has joined #ruby
Musashi007 has joined #ruby
<zenspider>
argh
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
casadei_ has quit [Remote host closed the connection]
christiandsg has joined #ruby
<sevenseacat>
most gems probably spew a lot of warnings
niiamon has joined #ruby
neoseeker has quit [Remote host closed the connection]
niiamon_ has joined #ruby
jobewan has joined #ruby
braincrash has quit [Quit: bye bye]
freerobby has joined #ruby
fabrice31 has joined #ruby
niiamon_ has quit [Client Quit]
_blizzy_ has joined #ruby
spiceweasel has joined #ruby
baweaver has joined #ruby
braincrash has joined #ruby
fabrice31 has quit [Ping timeout: 256 seconds]
juanpablo______ has joined #ruby
modern has quit []
jack_rabbit has joined #ruby
niiamon has quit [Ping timeout: 244 seconds]
modern has joined #ruby
modern has quit [Changing host]
modern has joined #ruby
Asher has quit [Quit: Leaving.]
kies^ has joined #ruby
mercwithamouth has joined #ruby
<zenspider>
sevenseacat: mine don't. rails doesn't. nokogiri and tenderlove's gems don't. plenty don't. all libraries shouldn't. I don't care what mess you make of your app... but don't fuck with mine with your shitty libs. makes me sad
juanpablo______ has quit [Ping timeout: 265 seconds]
godzillaenlacasa has quit [Quit: Peace Out Peeps!]
aaeron has quit [Quit: Leaving.]
<sevenseacat>
a lot of the gems in the rails apps I've built issue a shitload of warnings
<zenspider>
yeah... well.. they suck. file a bug.
<zenspider>
sequel is among them. and jeremy's BS rationalization annoys me
<zenspider>
sad that the one thing perlers got right was to respect their warnings and keep it clean
<sevenseacat>
I think because warnings arent shown by default. but then again, the first thing I did in PHP dev was turn error_reporting way up
mack25 has joined #ruby
oo_ has quit [Remote host closed the connection]
darkf has joined #ruby
neanderslob_ has joined #ruby
blahwoop has joined #ruby
symm- has quit [Ping timeout: 252 seconds]
<blahwoop>
hello all. i was just reviewing ruby procs and i'm a bit confused.
niiamon has joined #ruby
<blahwoop>
when should i use (&something) and (something)
neanderslob_ has quit [Remote host closed the connection]
<blahwoop>
i've seen it work for both with passing procs as arguments
yfeldblum has quit [Remote host closed the connection]
Rickmasta has quit [Ping timeout: 272 seconds]
<blahwoop>
is it only if i write a method that has (&block) as parameters?
Rickmasta has joined #ruby
iamse7en has joined #ruby
arooni-mobile has joined #ruby
<bnagy>
blahwoop: also common when passing methods themselves as args
<zenspider>
some methods will apply to_proc to a symbol passed to them. I don't think this is a good thing that encourages consistency and understanding
<zenspider>
but... m(lambda { ... }) is different... that's explictly passing a proc/lambda to a method just as a regular old argument.
oo_ has joined #ruby
charliesome has quit [Client Quit]
<zenspider>
also as: f=lambda { ... }; m(f)
<Ox0dea>
zenspider: Heh.
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<blahwoop>
ok so a method that expects a block to be an argument requires the &. if a method doesn't require or expect a block argument can pass a proc without the &
<blahwoop>
am i correct on this?
curses has joined #ruby
<bnagy>
not really
<blahwoop>
damn u procs
<bnagy>
you can throw a block at anything afaik, and any method can yield or check block_given?
<bnagy>
you only need &blk if you specifically want to pull a block arg into a variable as a proc
<bnagy>
eg if you're passing it on to something else, or whatever
<zenspider>
bnagy: you're conflating sending vs receiving
jack_rabbit has quit [Ping timeout: 246 seconds]
<bnagy>
I thought we were talking about how to method definitions now
<bnagy>
sorry I am pre coffee
<zenspider>
no, the & in the *calling* position does 2 things: call to_proc on the thingy in question and put it in the implicit block slot for the message send (ie, you can yield in the method body).
sevenseacat has quit [Quit: .]
charliesome has joined #ruby
<zenspider>
the & in the *method definition* position simply gives a name to any block sent to it on the calling side
<Ox0dea>
You never *have* to declare an explicit &block parameter.
<bnagy>
that's more or less what I was trying to say. :) you mostly don't want to use &blk when you define your methods
<blahwoop>
ok
<bnagy>
you would only do that if you were, eg, passing it on to something else
<zenspider>
I do so I can give them good names... that assumes I'm doing something with the proc, like storing it off
<zenspider>
right, or passing it down
curses has quit [Ping timeout: 246 seconds]
<blahwoop>
because if i do use & when defining the method it will require it
<blahwoop>
ok makes sense now
<zenspider>
no, it can be nil if no block is sent
jack_rabbit has joined #ruby
<blahwoop>
ok
<blahwoop>
that's the difference between a proc and a lambda
<Ox0dea>
>> def foo; proc[1, 2] end; foo { |a, b| a + b } # blahwoop: This should lessen your confusion. /s
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<blahwoop>
haha
<Ox0dea>
?
chipotle has quit [Quit: cheerio]
<blahwoop>
thanks
astrobunny has joined #ruby
<Ox0dea>
The double_x lambda "closes over" the x variable.
<Ox0dea>
Thus "closure".
shinnya has quit [Ping timeout: 272 seconds]
arescorpio has quit [Quit: Leaving.]
<blahwoop>
how do closures get garbage collected? looks like it's possible to have memory leaks if used the wrong way?
niiamon has joined #ruby
<Ox0dea>
I'm not intimately familiar with Ruby's GC, but I'd imagine the lambda would be collected once everything to which it holds a reference is gone.
lampshades has quit []
qiukun has quit [Ping timeout: 252 seconds]
jack_rabbit has quit [Ping timeout: 244 seconds]
leat2 has quit [Quit: leat2]
leat has joined #ruby
fenjamin has quit [Ping timeout: 244 seconds]
christiandsg has quit [Remote host closed the connection]
_Mercurial has joined #ruby
MatthewsFace has joined #ruby
GGMethos has quit [Quit: WeeChat 1.3-dev]
qiukun has joined #ruby
icebourg has joined #ruby
icebourg has quit [Max SendQ exceeded]
icebourg has joined #ruby
icebourg has quit [Max SendQ exceeded]
icebourg has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_djbkd has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
theery has quit [Remote host closed the connection]
scripore has quit [Quit: This computer has gone to sleep]
nofxx has quit [Ping timeout: 260 seconds]
Vile` has quit [Ping timeout: 256 seconds]
lessless has joined #ruby
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
willywos has joined #ruby
scripore has joined #ruby
agent_white has joined #ruby
jack_rabbit has joined #ruby
nisstyre has quit [Changing host]
nisstyre has joined #ruby
khebbie has joined #ruby
theery has joined #ruby
lannonbr has quit [Quit: WeeChat 1.2]
<agent_white>
Evenin' folks
<niiamon>
evening!
arooni-mobile has quit [Ping timeout: 246 seconds]
niiamon has quit [Quit: Leaving.]
niiamon has joined #ruby
Vile` has joined #ruby
konsolebox has joined #ruby
khebbie has quit [Ping timeout: 240 seconds]
niiamon has quit [Client Quit]
EllisTAA has joined #ruby
ivanskie has joined #ruby
<zenspider>
other way around. the lambda goes away whenever nothing is referencing IT. it is a valid reference to everything it closes over. I don't think ruby yet does free variable analysis on closures.
houhoulis has joined #ruby
gix has joined #ruby
tmtwd has quit [Ping timeout: 240 seconds]
oo_ has joined #ruby
Rickmasta has joined #ruby
jcdesimp has quit [Quit: Leaving...]
werelivinginthef has joined #ruby
rehat has joined #ruby
<rehat>
can I set a string as a default value to a method parameter?
<agent_white>
Yes
dgutierrez1287 has joined #ruby
niiamon has joined #ruby
JoshuaPaling has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
workmad3 has joined #ruby
ohaibbq has joined #ruby
<Ox0dea>
rehat: You can use pretty much anything as a default value.
<agent_white>
pontiki: MANNING IS HOLDING R4IA HOSTAGE?!
<Ox0dea>
>> def foo bar = (def bar; end); bar end; foo
<rehat>
ahh I was getting a error and I thought it was because I used a string. But it was because I had two default parameter with a non default parameter between them
Henchman21 has joined #ruby
Henchman21 has left #ruby ["WeeChat 1.2"]
j4cknewt has joined #ruby
rbowlby has joined #ruby
dgutierrez1287 has quit [Ping timeout: 252 seconds]
mdavid613 has quit [Quit: Leaving.]
MatthewsFace has quit [Remote host closed the connection]
Xiti has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
RobertBirnie has joined #ruby
baweaver has quit [Remote host closed the connection]
niiamon has quit [Quit: Leaving.]
niiamon has joined #ruby
niiamon has quit [Max SendQ exceeded]
bnagy has quit [Ping timeout: 272 seconds]
bnagy has joined #ruby
tubuliferous has joined #ruby
blaines has joined #ruby
niiamon has joined #ruby
willywos has quit [Ping timeout: 272 seconds]
rehat has quit []
gix has quit [Quit: Client exiting]
niiamon has quit [Client Quit]
niiamon has joined #ruby
niiamon has quit [Max SendQ exceeded]
tubuliferous has quit [Ping timeout: 255 seconds]
fenjamin has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
avocadorivalry has quit [Quit: avocadorivalry]
niiamon has joined #ruby
jack_rabbit has quit [Read error: Connection reset by peer]
blaines has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
Inside has joined #ruby
<Inside>
hey guys~
<Inside>
this is more of a database question, I guess, but uhhh what's the best way to monitor a database (sql server through tinytds) and then perform an action whenever there is a row update?
<Inside>
(action on the client)
<Inside>
I mean
<Inside>
I can poll the database once per second or so
<Inside>
it's a local sql server instance so it's not like performance is going to be impacted any
<Inside>
hrm
j4cknewt has quit [Read error: Connection reset by peer]
j4cknewt_ has joined #ruby
theery has quit [Remote host closed the connection]
lxsameer has joined #ruby
blahwoop has quit [Remote host closed the connection]
GGMethos has joined #ruby
keen__________32 has quit [Read error: Connection reset by peer]
EllisTAA has joined #ruby
keen__________32 has joined #ruby
charliesome has quit [Quit: zzz]
qiukun has quit [Quit: qiukun]
GriffinHeart has quit [Ping timeout: 240 seconds]
j4cknewt_ has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
eminencehc has joined #ruby
j4cknewt has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
niiamon has quit [Read error: Connection timed out]
niiamon has joined #ruby
triangles has quit [Read error: Connection reset by peer]
triangles has joined #ruby
redlegion has quit [Ping timeout: 264 seconds]
texasmade has joined #ruby
iamse7en has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
armyriad has quit [Ping timeout: 250 seconds]
Mendenhall has joined #ruby
Channel6 has quit [Ping timeout: 260 seconds]
theery has joined #ruby
armyriad has joined #ruby
redlegion has joined #ruby
christiandsg has joined #ruby
Channel6 has joined #ruby
Sapna has joined #ruby
<Sapna>
Hello everyone..
armyriad has quit [Max SendQ exceeded]
<Sapna>
Suppose my command is (Get-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion" -Name "InstallationType" -ErrorAction "SilentlyContinue").InstallationType and I want to store it in variable suppose output then how to do it in ruby??
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Sapna>
havenwood : I have tried output = `(Get-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion" -Name "InstallationType" -ErrorAction "SilentlyContinue").InstallationType` But it not store output in variable .It gives null value in variable
<havenwood>
Sapna: Just? nil
freerobby has joined #ruby
<havenwood>
Sapna: Is the output actually going to stderr instead of stdout possibly?
RobertBirnie has quit [Ping timeout: 255 seconds]
failshell has joined #ruby
niiamon has quit [Read error: Connection timed out]
juanpablo______ has quit [Ping timeout: 260 seconds]
niiamon has joined #ruby
lkba has joined #ruby
riscky has quit [Quit: riscky]
failshell has quit [Remote host closed the connection]
<Sapna>
havenwood : Then how to store output in variable
<havenwood>
Sapna: Backticks just capture stdout. If you want stderr as well look at the various options with open3 or popen3.
leat has quit [Remote host closed the connection]
leat has joined #ruby
mack25 has quit [Ping timeout: 250 seconds]
EllisTAA has quit [Quit: EllisTAA]
fabrice31 has joined #ruby
charliesome has joined #ruby
happy_dev has joined #ruby
baweaver has quit [Remote host closed the connection]
jriese has quit [Quit: welp]
<havenwood>
Sapna: For example, a merged stdout and stderr stream: require 'open3'; directory_contents, status = Open3.capture2e 'dir'
Rickmasta has joined #ruby
<bnagy>
Sapna: that looks like powershell
temerut has joined #ruby
temerut has left #ruby [#ruby]
nofxx has quit [Ping timeout: 240 seconds]
<bnagy>
I doubt you can run that as a normal command
jriese has joined #ruby
<havenwood>
Sapna: Or you can have stdout and stderr separate. I'm still not clear if you really are getting error output or if it's just not returning anything.
nofxx has joined #ruby
<bnagy>
I'd suggest reading the registry directly with one of the windows gems
<Sapna>
havenwood : It returns null value in variable
fabrice31 has quit [Ping timeout: 246 seconds]
<happy_dev>
hey all, im having a bit of trouble getting jekyll installed on my VPS on a mac
<havenwood>
happy_dev: no prob, yeah they don't have mkmf in debian ruby package like normal ruby - you have to install the dev package to get that
<happy_dev>
oh i see
<Ox0dea>
Sapna: Why are you using the phrase "null value" here? If the command you're running with backticks doesn't write to stdout, the return value will be an empty string, not nil.
Inside has quit [Ping timeout: 256 seconds]
piotrj has quit [Remote host closed the connection]
jriese has quit [Quit: welp]
shadoi has quit [Quit: Leaving.]
niiamon has quit [Read error: Connection timed out]
theery has quit [Remote host closed the connection]
niiamon has joined #ruby
theery has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
i8igmac has quit [Remote host closed the connection]
tjbiddle has quit [Quit: tjbiddle]
freerobby has quit [Quit: Leaving.]
curses has joined #ruby
<bnagy>
Ox0dea: if it's not a real command you'll get nil
Sapna has quit [Ping timeout: 240 seconds]
eminencehc has quit [Remote host closed the connection]
<bnagy>
which is consistent with trying to run powershell goop in ``
<Ox0dea>
bnagy: I get an ENOENT.
astrobun_ has joined #ruby
theery has quit [Read error: Connection reset by peer]
<bnagy>
Ox0dea: foo = `tfghvjbklhkgjfh`; foo
theery has joined #ruby
<Ox0dea>
bnagy: See above?
icebourg has quit []
amclain has quit [Quit: Leaving]
<bnagy>
it raises, and the variable will be nil
PhantomS_ has quit [Remote host closed the connection]
curses has quit [Ping timeout: 250 seconds]
<Ox0dea>
bnagy: That's only because the variable has been brought into existence. An unsuccessful `` apparently doesn't return anything.
astrobun_ has quit [Ping timeout: 256 seconds]
<bnagy>
... which is what I just said
<bnagy>
and what Sapna described
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
No, it isn't.
Alina-malina has quit [Quit: Leaving]
<bnagy>
whatever :) I have better things to do than watch you pretend to be right all along
<Ox0dea>
bnagy: Well, you said `` returns nil on failure; does it?
michael_mbp has quit [Excess Flood]
<Ox0dea>
Rather, you strongly indicated that to be your understanding of the thing.
nini1294 has quit [Ping timeout: 265 seconds]
wprice has quit [Ping timeout: 252 seconds]
<agent_white>
Ox0dea: Step down, son! bnagy is my homeboy,.
theery has quit [Ping timeout: 250 seconds]
<Ox0dea>
agent_white: Someone is wrong on the Internet. You know how this works.
j4cknewt has quit [Ping timeout: 252 seconds]
Ilyas has joined #ruby
<agent_white>
Ox0dea: Nah I'm going gang mentality. I haven't read the above, just got back to the keys. I love bnagy.
michael_mbp has joined #ruby
<Ox0dea>
Did you mean "mob mentality"?
j4cknewt has joined #ruby
arooni-mobile__ has joined #ruby
arooni-mobile__ has left #ruby [#ruby]
GriffinHeart has joined #ruby
tjbiddle has joined #ruby
werelivinginthef has quit [Ping timeout: 256 seconds]
elton has joined #ruby
j4cknewt has quit [Read error: Connection reset by peer]
niiamon has quit [Read error: Connection timed out]
nini1294 has joined #ruby
j4cknewt has joined #ruby
niiamon has joined #ruby
<agent_white>
Nah. I'm a crypt. Whaddup, 'cuz?
allomov has joined #ruby
<Aeyrix>
> crypt
<Aeyrix>
You mean Crip, right?
<agent_white>
Ox0dea: On a serious note, it doesn't make me happy to know that an empty string is returned from an stderr response.
tagrudev has joined #ruby
<agent_white>
Aeyrix: Nah, I'm talking about skeletons, and ghouls n' stuff.
<Aeyrix>
i c
wprice has joined #ruby
iateadonut has quit [Ping timeout: 265 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
agent_white: You would prefer that backticks merged the streams or something?
riotjones has joined #ruby
oo_ has quit [Remote host closed the connection]
Sapna has joined #ruby
bluOxigen has joined #ruby
<agent_white>
Ox0dea: I'm just wondering why would you want "a = `asdfasdflkjasdflkj`"
<agent_white>
and "a = `>&2 echo 'error`" to return the same value.
<bnagy>
they don't?
nini1294 has quit [Ping timeout: 244 seconds]
last_staff has joined #ruby
<agent_white>
Oh. I'm assigning them both to variables :)
<bnagy>
if it raises then there's no return so you get a nil variable
<agent_white>
Hm.
riotjones has quit [Ping timeout: 240 seconds]
<bnagy>
if it completes with an error (and not stdout) you get "" because .. there's no stdout
<bnagy>
if you want stderr you need to do something else, which havenwood went over above
<agent_white>
Oh ok! I'll look up.
<bnagy>
eg use one of the Open3 methods
<agent_white>
Odd that it would treat stderr differently, though... wonder why. *me straps on his google cape*
<bnagy>
cause `` means "give me the stdout of this command"
<Ox0dea>
bnagy: You don't get a nil variable. A bad `` essentially causes the interpreter to ignore the enclosing expression.
<agent_white>
Ah. Why not just have it give the stdout and stderr?
icosa1 has joined #ruby
arooni-mobile has quit [Quit: Leaving]
tmtwd has quit [Remote host closed the connection]
<agent_white>
If I shell out, I want the response. Be stdout, stderr, stdhismother.
<bnagy>
Ox0dea: you absolutely do get a nil variable :) You get a variable which exists, and is nil
Ilyas has quit [Read error: Connection reset by peer]
sevenseacat has joined #ruby
<agent_white>
I don't get it... then if there's no stdout for that command (of course assuming no makefile to be had there), why isn't the first element nil, since there is no stdout?
hahuang65 has quit [Ping timeout: 250 seconds]
roolo has joined #ruby
<bnagy>
y u do dis
<agent_white>
I can't nil :(
elton has quit [Remote host closed the connection]
Ilyas has joined #ruby
riotjones has joined #ruby
<bnagy>
stdout is empty. So you get an empty string.
fenjamin has quit [Ping timeout: 240 seconds]
<bnagy>
not, imho, weird
workmad3 has joined #ruby
axisys has joined #ruby
axisys has quit [Changing host]
axisys has joined #ruby
<agent_white>
I thought nil was empty
<agent_white>
Why do I need a string?
<bnagy>
to hold the contents of stdout
<agent_white>
That don't exist?
<bnagy>
indeed
<agent_white>
Weird beans.
codecop has joined #ruby
elton has joined #ruby
<Ox0dea>
agent_white: $ ls /proc/self/fd
<bnagy>
o,e=Open3.blahblah if o.empty? ... do stuff
piotrj has joined #ruby
<agent_white>
Is there a command that would, using Open3, return nil for stdout?
<Ox0dea>
agent_white: File descriptors 0 (stdin), 1 (stdout), and 2 (stderr) exist by default.
<agent_white>
Ox0dea: I know.
<agent_white>
Why a file descriptor unwritten has a value is my concern.
<bnagy>
agent_white: no (I hope, anyway)
<bnagy>
because if it doesn't raise it should always return a string
dseitz has quit [Remote host closed the connection]
elton has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 252 seconds]
elton has joined #ruby
<Ox0dea>
agent_white: You'd want Open3 to take into account whether the process being invoked explicitly uses close(3) on one of its default descriptors?
arup_r has joined #ruby
ayonkhan has quit []
schaerli has joined #ruby
j4cknewt has quit [Read error: Connection reset by peer]
<Ox0dea>
An empty file isn't nonexistent; it's just empty.
Ilyas has quit [Read error: Connection reset by peer]
j4cknewt has quit [Read error: Connection reset by peer]
<agent_white>
Well... kewl. Learned to not use backticks today :D
GriffinHeart has quit [Remote host closed the connection]
rsc___ has joined #ruby
j4cknewt has joined #ruby
affenhoden has quit [Quit: leaving]
<agent_white>
Ox0dea, bnagy: Thanks for listening to absurdity. I read the above but didn't get the response I understood until asking my stupid questions. :D
krz has joined #ruby
<agent_white>
And thanks for the explanation! Nil is a bit less opaque.
krz is now known as Guest38847
affenhoden has joined #ruby
affenhoden has left #ruby [#ruby]
sinkensabe has joined #ruby
woodruffw has quit [Ping timeout: 250 seconds]
j4cknewt_ has joined #ruby
hahuang65 has joined #ruby
Guest38847 has quit [Ping timeout: 252 seconds]
j4cknewt has quit [Read error: Connection reset by peer]
ksjdflsjldf has joined #ruby
<wasamasa>
"Null References: The Billion Dollar Mistake"
shock_one has joined #ruby
GriffinHeart has joined #ruby
shock_one has quit [Client Quit]
MatthewsFace has joined #ruby
leat has quit [Quit: leat]
bruno- has joined #ruby
leat has joined #ruby
j4cknewt has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ksjdflsjldf has quit [Remote host closed the connection]
j4cknewt_ has quit [Read error: Connection reset by peer]
ksjdflsjldf has joined #ruby
j4cknewt has quit [Read error: Connection reset by peer]
affenhoden has joined #ruby
ksjdflsjldf is now known as abucha
j4cknewt has joined #ruby
towski_ has quit [Remote host closed the connection]
affenhoden has quit [Client Quit]
j4cknewt has quit [Remote host closed the connection]
AnoHito has joined #ruby
<agent_white>
NULL penetrates all the layers to find you, and can only say, helplessly, "Looks like you're having a problem". Endemic to the problem, not the problem, complicity, and might be the problem).
bruno- has quit [Ping timeout: 255 seconds]
fabrice31 has joined #ruby
nini1294 has joined #ruby
<agent_white>
_why, deviant knight of the NULL.
Guest38847 has joined #ruby
shock_one has joined #ruby
safeforge has joined #ruby
niiamon has joined #ruby
affenhoden has joined #ruby
leat has quit [Remote host closed the connection]
leat has joined #ruby
christiandsg has joined #ruby
piotrj has quit [Remote host closed the connection]
woodruffw has joined #ruby
tvw has joined #ruby
sente has quit [Remote host closed the connection]
niiamon has quit [Ping timeout: 246 seconds]
niiamon has joined #ruby
j4cknewt has joined #ruby
howdoicomputer has joined #ruby
howdoicomputer has quit [Client Quit]
christiandsg has quit [Ping timeout: 265 seconds]
safeforge has quit []
howdoicomputer has joined #ruby
niiamon1 has joined #ruby
niiamon has quit [Ping timeout: 244 seconds]
MatthewsFace has quit [Remote host closed the connection]
abucha_ has joined #ruby
howdoicomputer has quit [Client Quit]
j4cknewt has quit [Ping timeout: 240 seconds]
howdoicomputer has joined #ruby
eGGsha has joined #ruby
werelivinginthef has joined #ruby
niiamon1 has quit [Ping timeout: 255 seconds]
niiamon has joined #ruby
allomov has quit [Remote host closed the connection]
sepp2k has joined #ruby
juanpablo______ has joined #ruby
abucha has quit [Ping timeout: 256 seconds]
howdoicomputer has quit [Client Quit]
aganov has joined #ruby
yeticry has quit [Remote host closed the connection]
juanpablo______ has quit [Ping timeout: 260 seconds]
graft has joined #ruby
Blaguvest has quit []
craysiii has joined #ruby
abucha_ has quit [Remote host closed the connection]
<BraddPitt>
heh
abucha has joined #ruby
Philipp__ has joined #ruby
schaerli has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
strixd has joined #ruby
strixd has quit [Excess Flood]
strixd has joined #ruby
strixd has quit [Excess Flood]
strixd has joined #ruby
strixd has quit [Excess Flood]
hololeap has quit [Ping timeout: 244 seconds]
Sapna has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
schaerli has joined #ruby
towski_ has joined #ruby
htmldrum has quit [Ping timeout: 265 seconds]
niiamon has quit [Read error: Connection timed out]
failshell has joined #ruby
timonv has joined #ruby
ofdtrinity has joined #ruby
niiamon has joined #ruby
Sapna has quit [Ping timeout: 260 seconds]
bayed has joined #ruby
piotrj has joined #ruby
iateadonut has joined #ruby
<tjbiddle>
How can I rescue an exception, but not have it continue? I just want to eat the message (Trying to abort a capistrano task - I'm printing my own message)
towski_ has quit [Ping timeout: 246 seconds]
Vile` has quit [Ping timeout: 250 seconds]
joonty has joined #ruby
<ljarvis>
tjbiddle: and then do what? exit? to "not continue" you need to forcibly abort
ishahnaz has joined #ruby
<ljarvis>
or just re-raise your own error
<ljarvis>
(which is quite common thing to do)
Vile` has joined #ruby
<tjbiddle>
ljarvis: Wouldn't my error just be called and then bubble up and the same issue happen?
Mendenhall has quit [Ping timeout: 246 seconds]
failshell has quit [Ping timeout: 255 seconds]
Feyn has joined #ruby
<ljarvis>
tjbiddle: the same rescue block won't rescue the exception you just rescued, but of course it is possible that it could be rescued somewhere else yeah
<tjbiddle>
Ah fuck it. Don't need this functionality anyways. Just going down another rabbit hole to defer.
schaerli has quit [Remote host closed the connection]
khebbie_ has quit [Remote host closed the connection]
khebbie has quit [Client Quit]
iateadonut has quit [Read error: No route to host]
woodruffw has quit [Read error: Connection reset by peer]
leesharma has quit [Ping timeout: 240 seconds]
graft has quit [Ping timeout: 265 seconds]
GeissT has quit [Ping timeout: 246 seconds]
mercwithamouth has quit [Ping timeout: 260 seconds]
lessless has quit [Ping timeout: 255 seconds]
j4cknewt has joined #ruby
woodruffw has joined #ruby
dfockler has joined #ruby
<BraddPitt>
tjbiddle do you mean using 'next' to continue withouth doing anything with the exception?
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
_ht has joined #ruby
dvb_ua has joined #ruby
schaerli has joined #ruby
PhantomSpank has joined #ruby
<tjbiddle>
BraddPitt: No - I don't want it to continue. I wanted to print a message and just end everything.
<BraddPitt>
you can just keep throwing it up
<BraddPitt>
or don't rescue it at all?
<BraddPitt>
or explicitly exit if the exception is rescued
abucha has quit [Quit: Leaving...]
ohaibbq has quit [Quit: Leaving...]
walterzm has joined #ruby
mercwithamouth has joined #ruby
AnoHito has quit [Quit: Leaving]
walterzm has quit [Client Quit]
ishahnaz has quit []
dfockler has quit [Ping timeout: 244 seconds]
zdwgeoounmfq has joined #ruby
ThongKu has joined #ruby
aotg has joined #ruby
omegamike has joined #ruby
PhantomSpank has quit [Ping timeout: 240 seconds]
rbowlby has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
<abdulrehman>
morning
houhoulis has quit [Remote host closed the connection]
ishahnaz has joined #ruby
zdwgeoounmfq has quit [Remote host closed the connection]
neanderslob has joined #ruby
abucha has joined #ruby
Ropeney has joined #ruby
niiamon has quit [Read error: Connection timed out]
niiamon has joined #ruby
omegamike has quit [Ping timeout: 265 seconds]
SOLDIERz has joined #ruby
kies^ has quit [Ping timeout: 264 seconds]
michael_mbp has joined #ruby
nahtnam has quit [Quit: Connection closed for inactivity]
roolo has quit [Remote host closed the connection]
dmolina has joined #ruby
niiamon1 has joined #ruby
rikkipitt has joined #ruby
schaerli has quit [Remote host closed the connection]
niiamon has quit [Ping timeout: 240 seconds]
ThongKu has left #ruby ["Leaving"]
schaerli has joined #ruby
kedare has joined #ruby
allomov has joined #ruby
schaerli has quit [Read error: Connection reset by peer]
<flughafen>
oi oi oi shevy sevenseacat how goes it
<sevenseacat>
not bad... not bad
schaerli has joined #ruby
<flughafen>
great!
<flughafen>
is it gererally an ok/whatever/bad practice to use minitest assertions with cucumber/capybbbara?
mercwithamouth has quit [Ping timeout: 244 seconds]
TinkerTyper has quit [Quit: ZNC restarting...]
senayar has joined #ruby
senayar has joined #ruby
<senayar>
Anne: stop spam please
<Anne>
sorry
TinkerTyper has joined #ruby
Trynemjoel has quit [Ping timeout: 250 seconds]
rikkipitt has quit [Quit: Leaving...]
livathinos has joined #ruby
Trynemjoel has joined #ruby
arturmartins has joined #ruby
fabrice31_ has joined #ruby
davedev24 has quit []
<yorickpeterse>
morning
Sapna has joined #ruby
fabrice31 has quit [Ping timeout: 255 seconds]
chipotle has joined #ruby
duncannz has joined #ruby
{756d6f} has joined #ruby
oo_ has quit [Remote host closed the connection]
chinmay_dd has quit [Ping timeout: 240 seconds]
arturmartins has quit [Ping timeout: 255 seconds]
<zemmihates>
hey, I was looking for some resources on background jobs and was wondering if any of you had some recommendations
niiamon1 has quit [Read error: Connection timed out]
fabrice31_ has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: zzz]
fabrice31 has joined #ruby
andikr has joined #ruby
niiamon has joined #ruby
Sapna has quit [Ping timeout: 246 seconds]
tjbiddle_ has joined #ruby
tjbiddle has quit [Ping timeout: 250 seconds]
tjbiddle_ is now known as tjbiddle
oo_ has joined #ruby
TheHodge has joined #ruby
abucha has quit [Quit: Leaving...]
walterizyion has joined #ruby
wldcordeiro_ has quit [Remote host closed the connection]
<ljarvis>
zemmihates: sidekiq + redis is a popular option
jobewan has quit [Ping timeout: 255 seconds]
htmldrum has joined #ruby
wldcordeiro_ has joined #ruby
<zemmihates>
ljarvis: is there much in the way of rabbitmq?
<ljarvis>
zemmihates: Not sure, I haven't used it before
workmad3 has joined #ruby
<zemmihates>
no problems :D
<zemmihates>
thank you, I'll have a look at sidekiq none the less.
iateadonut has joined #ruby
<shortdudey123>
most queuing systems can be used for background jobs: redis, activemq, rabbitmq, kafka
<shortdudey123>
i have seen cassandra and mysql used for background tasks too haha
iateadonut has quit [Client Quit]
alienaut has joined #ruby
<abdulrehman>
do we have another way of taking in commands beside the optionparser?
<bnagy>
zemmihates: for a pure queue, beanstalkd is pretty great
timonv has quit [Ping timeout: 240 seconds]
<bnagy>
I use rabbit as well, but only for pubsub
walterizyion has quit [Quit: Leaving...]
fabrice31_ has joined #ruby
abucha has joined #ruby
<shortdudey123>
abdulrehman: trollop
<zemmihates>
bnagy: thanks.
<abdulrehman>
I'll look that up, many thanks shortdudey123
<shortdudey123>
np
marr has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
execat has joined #ruby
<zemmihates>
this whole background job and queue stuff is just making my head hurt. heh.
htmldrum has quit [Ping timeout: 244 seconds]
<bnagy>
zemmihates: beanstalkd is pretty roll-your-own, though, if you're using other (eg web stuff) then the other recommendations are probably better
arturmartins has joined #ruby
<bnagy>
if only because more other people use them and will be able to help
<zemmihates>
thanks for the heads up :)
wldcordeiro_ has quit [Remote host closed the connection]
<adaedra>
jhass: it's very interesting anyway, thanks
fabrice31 has quit [Ping timeout: 240 seconds]
wldcordeiro_ has joined #ruby
<shortdudey123>
zemmihates: if you use redis, take a look at redis-sentinel too
<execat>
Guys. how does "private" work in Ruby (while interpreting)?
<adaedra>
?guys
<ruboto>
You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folks", "y'all" or "everyone" instead?
<execat>
I expected it to be a keyword.
fabrice31_ has quit [Client Quit]
<bnagy>
haha, fooled you.
tubuliferous has joined #ruby
<execat>
"Guys" should be redefined to mean "people" instead of "male members".
<adaedra>
sigh.
<zenspider>
flughafen: I'd consider it bad practice to use cucumber in general... but I'm biased
<ljarvis>
cucumber is utter shit
Musashi007 has quit [Quit: Musashi007]
<flughafen>
zenspider: cucumber isn't going anywhere, i didn't start it.
<zenspider>
execat: that's nice, but it's not going to happen here, so respect the community norms
<flughafen>
what do you guys uyse instead of cucumber?
<agent_white>
I disagree with ruboto's dictionary. I call friends who are girls "dude" all the time. Making the distinction of "guys" is worse than not.
<zenspider>
... *sigh*
<ljarvis>
execat: check the documentation, it's a method on Module
<ljarvis>
flughafen: I use minitest for writing my tests
<agent_white>
ruboto: Good on your for being sexist you prick.
niiamon has quit [Read error: Connection timed out]
<sevenseacat>
agent_white: sorry what?
<bnagy>
?guys2 agent_white
<ruboto>
agent_white, it doesn’t matter if it’s "normal"/gender neutral to say "guys" in your idiolect. "You guys" to refer to a mixed group is erasure. All we ask from you is to be a decent channel member and respect that. If you want to further discuss this, join #ruby-offtopic.
<bnagy>
<3 ruboto
<ljarvis>
agent_white: no more discussing this please. It's the rules of this community
niiamon has joined #ruby
<ljarvis>
if you want to discuss, go to #ruby-offtopic
<execat>
ljarvis: That is exactly what I wanted. Thanks!
<zenspider>
... cancels the /stfu agent_white
<zenspider>
and I was so ready too
<agent_white>
sevenseacat: Can't discuss here or I'll be in the trees. Sorry.
<adaedra>
:)
<sevenseacat>
good, take your insults and sexism elsewhere.
<agent_white>
Mine?
<sevenseacat>
yes.
<zenspider>
!mute agent_white
<zenspider>
nope. we're done
<sevenseacat>
ta.
axl_ has joined #ruby
<zenspider>
rawr
<flughafen>
zenspider: ("\(*,,,,*)/") rawr!!!
<sevenseacat>
I expect a PM barrage shortly.
<zenspider>
I uh... k
niiamon1 has joined #ruby
<bnagy>
Vote Cthulhu 2016
michael_mbp has quit [Excess Flood]
tubuliferous has quit [Ping timeout: 256 seconds]
<zenspider>
haha
<zenspider>
agent_white is welcome to take it up with me in ruby-banned or -offtopic
<flughafen>
i'd vote for cthulu over trump
<zenspider>
but yup. here come the pms
djbkd_ has joined #ruby
lkba_ has joined #ruby
niiamon has quit [Ping timeout: 246 seconds]
tjbiddle has quit [Ping timeout: 265 seconds]
schaerli has quit [Remote host closed the connection]
failshell has joined #ruby
n008f4g_ has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
werelivinginthef has quit [Ping timeout: 246 seconds]
tjbiddle has joined #ruby
j4cknewt has quit [Ping timeout: 246 seconds]
m4rCsi has quit [Ping timeout: 244 seconds]
<adaedra>
?botsnack
<ruboto>
nomnomnomnom
michael_mbp has joined #ruby
ruby-lang332 has joined #ruby
abucha_ has joined #ruby
<ruby-lang332>
is there a channel to discuss ruby c extensions?
<ruby-lang332>
ljarvis: Luis Lavena is a Ruby/Win32 expert?
<BraddPitt>
only thing I can think of is if formatting is somehow off
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bnagy>
BraddPitt: try to interop with the openssl commandline tools?
<zenspider>
it's not silly line endings, is it?
<bnagy>
your code doesn't look obviously wrong to me, but the openssl API is just terribad
senayar has quit [Remote host closed the connection]
<GriffinHeart>
well i tried like `OpenSSL::PKey::RSA.new(OpenSSL::PKey::RSA.new(2048).to_pem(OpenSSL::Cipher.new('aes-256-gcm'), 'TEST_PASSWORD'), 'TEST_PASSWORD')`
senayar has joined #ruby
neanderslob has quit [Read error: Connection reset by peer]
Sapna has joined #ruby
<GriffinHeart>
which is just the ugly version of the gist I guess. I'll try generate from rb and read for openssl
<GriffinHeart>
and the opposite (I mean commandline tools)
<bnagy>
GriffinHeart: fwiw it doesn't work if you follow the docs exactly either
<bnagy>
using export
Guest38847 has quit [Read error: Connection reset by peer]
<GriffinHeart>
bnagy: hmm...yeah in docs export is actually wrong
<bnagy>
ok so it's openssl muppetry not Ruby muppetry
<bnagy>
crypto is fun! Let's all do crypto! With openssl! \o/
apfeluser has joined #ruby
kokoleavia has quit [Ping timeout: 246 seconds]
<GriffinHeart>
dark magic voddoo stuff, thanks for helping me out guys
Fraeon has quit [Quit: Lost terminal]
christiandsg has quit [Ping timeout: 265 seconds]
djbkd has quit [Ping timeout: 265 seconds]
<GriffinHeart>
bnagy: did you find a bugtrack or issue or similar that I could follow?
{756d6f} has quit [Ping timeout: 244 seconds]
<bnagy>
GriffinHeart: only that answer where they say it should be patched in g
wldcordeiro_ has quit [Remote host closed the connection]
wldcordeiro_ has joined #ruby
Fraeon has joined #ruby
dumdedum has joined #ruby
abucha_ has joined #ruby
abucha_ has quit [Client Quit]
wldcordeiro_ has quit [Remote host closed the connection]
ksldjflks has joined #ruby
wldcordeiro_ has joined #ruby
ksldjflks has quit [Client Quit]
juanpablo______ has joined #ruby
abucha_ has joined #ruby
abucha_ has quit [Client Quit]
pygospa has quit [Ping timeout: 252 seconds]
<GriffinHeart>
bnagy: Thank you
abucha has quit [Ping timeout: 260 seconds]
abucha_ has joined #ruby
abucha_ has quit [Remote host closed the connection]
leat has quit [Remote host closed the connection]
leat has joined #ruby
schaerli has joined #ruby
abucha has joined #ruby
wldcordeiro_ has quit [Remote host closed the connection]
wldcordeiro_ has joined #ruby
kline has joined #ruby
Guest38847 has joined #ruby
sameerynho has quit [Ping timeout: 252 seconds]
juanpablo______ has quit [Ping timeout: 250 seconds]
abucha has quit [Remote host closed the connection]
camilasan has quit [Remote host closed the connection]
abucha has joined #ruby
codecop has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
f4cl3y has joined #ruby
blackmesa has joined #ruby
wldcordeiro_ has quit [Remote host closed the connection]
camilasan has joined #ruby
execat has quit [Ping timeout: 246 seconds]
umo20 has joined #ruby
abucha has quit [Client Quit]
abucha has joined #ruby
DoubleMalt has quit [Ping timeout: 244 seconds]
schaerli has quit [Remote host closed the connection]
djbkd_ has quit [Read error: Connection reset by peer]
sameerynho has joined #ruby
wldcordeiro_ has joined #ruby
meph has joined #ruby
djbkd has joined #ruby
bumbar_ has joined #ruby
<shevy>
if I yield a block, it returns the last statement given? for instance... foo { :one; :two } <-- I would only receive the symbol :two here right?
<firoxer>
Yeah
sevenseacat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
khebbie_ has quit [Quit: Leaving...]
<neanias>
Ugh
wldcordeiro_ has quit [Remote host closed the connection]
<neanias>
Fine
<neanias>
I give in
alienaut has quit [Remote host closed the connection]
* neanias
goes back to work
<mikecmpbll>
:/
wldcordeiro_ has joined #ruby
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gagrio has joined #ruby
brotspinne has joined #ruby
<zenspider>
shevy: just like any other block expression. `if true then 1; 2; end`
BeatzKilla_ has joined #ruby
stef204 has joined #ruby
Igorshp has joined #ruby
senayar has quit [Remote host closed the connection]
allomov has quit []
c0m0 has joined #ruby
xcesariox has joined #ruby
Siyfion has joined #ruby
senayar has joined #ruby
anisha has joined #ruby
anisha has quit [Remote host closed the connection]
<sysx1000>
How can i set @ variable? e.g. some_super_ultra_function_of_setting_@_variable('my_variable_name', :its_value)
quimrstorres has joined #ruby
anisha has joined #ruby
<mikecmpbll>
instance_variable_set("@var", val)
_ixti_ has joined #ruby
<sysx1000>
gotcha!
<sysx1000>
thx!
quimrstorres has quit [Remote host closed the connection]
wldcordeiro_ has quit [Remote host closed the connection]
<ruboto>
Ox0dea # => [:const_get, :const_set, :class_variable_get, :class_variable_set, :instance_variable_get, :instance ...check link for more (https://eval.in/408853)
ixti has quit [Ping timeout: 260 seconds]
<folex>
Hi all!
<folex>
Is there any way to enable strict checking for variable names? I want ruby to warn me about using undeclared variable. I just want some protection from typos.
JoshuaPaling has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arup_r has quit [Remote host closed the connection]
<bougyman>
folex: I use static analysis for that.
<bougyman>
rubocop, specifically.
<bougyman>
it's tied into my editor, I can't save a file with a mistake like that in it.
<folex>
bougyman: how often do you run it?
<bougyman>
folex: my editor runs it every time I save a file.
<folex>
bougyman: what editor exactly?
sevenseacat has joined #ruby
<bougyman>
and if it hits a warning (the levels are configurable), it halts the save and puts the cursor on the line with the problem.
<bougyman>
with a notification in the statusbar telling me how I fucked up.
<bougyman>
I'm using vim with syntastic and a couple settings to enable this.
khebbie has quit [Ping timeout: 252 seconds]
DoubleMalt has joined #ruby
<zenspider>
folex: ruby -w warns against uninitialized vars
workmad3 has joined #ruby
<firoxer>
bougyman, do you think the default settings for Rubocop are sane?
<zenspider>
I don't... but I created seattle-style. :)
[k- has joined #ruby
<firoxer>
Uh, what do you mean by that? :D
Sapna has joined #ruby
melter has quit [Ping timeout: 244 seconds]
<firoxer>
Oh!
<havenwood>
tuk5nag
ixti has joined #ruby
<zenspider>
I don't like rubocop's default settings. at all. still (only sorta) working on getting a config that represents our programming style. still probably have ~10 bugs open on rubocop (that might not be true anymore... I haven't checked)
stan has joined #ruby
kline has left #ruby ["WeeChat 1.0.1"]
<yorickpeterse>
Some of its defaults are _really_ pedantic
senayar has quit [Remote host closed the connection]
<yorickpeterse>
e.g. requiring whitespace after { and before } when using hash literals
senayar has joined #ruby
<yorickpeterse>
(so { ... } vs {...})
<firoxer>
I try to convince myself that my code will get better if I obey...
<yorickpeterse>
or requiring #encoding comments
PhantomSpank has joined #ruby
<yorickpeterse>
(not sure if that's still in)
<firoxer>
Though some of the stuff it spouts out is _really really_ pedantic
<zenspider>
I'm a BIG fan of using the space bar, personally
wldcordeiro_ has joined #ruby
<zenspider>
but I agree
schaerli has joined #ruby
_ixti_ has quit [Ping timeout: 264 seconds]
banister has joined #ruby
banister has quit [Client Quit]
<firoxer>
IMO blocks should be padded and hash literals not
<firoxer>
Makes the different meanings stand out
Renich has joined #ruby
<zenspider>
simple context makes them stand out
<firoxer>
Well, yeah
<firoxer>
If you have to depend on whitespace you're already screwed
omegamike has joined #ruby
rsc___ has quit [Quit: rsc___]
oo_ has quit [Remote host closed the connection]
<mikecmpbll>
i went through a period of crippling self-doubt over my block style, but i'm out the other side and nobody will sway me now
<zenspider>
I'm old. With older eyes. I need whitespace.
* mikecmpbll
feels emboldened
<zenspider>
haha
<folex>
zenspider: "-w' Enables verbose mode without printing version message at the beginning. It sets the $VERBOSE variable to true."
<zenspider>
so the version is right in the tarball
<gregf_>
SOLDIERz: untar/unip and read the README?
arup_r has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
<gregf_>
SOLDIERz: rvm/rbenv(environment managers) could save you all that trouble :/
<SOLDIERz>
gregf_ actually I'm using them but I got a weired problem that ruby -v is not returning me the correct version it's returning me 2.2.1 but the deployed version is 2.2.2 so
<adaedra>
chruby!
<SOLDIERz>
Yes I'm using chruby adaedra
<SOLDIERz>
why?
riffraff has joined #ruby
<SOLDIERz>
could not find any version in the README
<adaedra>
I just throw that in here, since it was missing from gregf_ list :)
duncannz has quit [Remote host closed the connection]
<SOLDIERz>
ah okay
CustosLimen has quit [Ping timeout: 240 seconds]
<adaedra>
are you sure the right ruby version is selected? That system ruby is not interfering?
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rsc___ has quit [Quit: rsc___]
nofxx has quit [Ping timeout: 252 seconds]
<jhass>
I think command -v is the most portable one
withnale_ has joined #ruby
nofxx has joined #ruby
<havenwood>
command -v ruby
<havenwood>
beat me to it, aye posixy
nofxx has quit [Changing host]
nofxx has joined #ruby
rsc___ has joined #ruby
MatrixBridge has joined #ruby
abucha has quit [Ping timeout: 256 seconds]
elia has quit [Quit: Computer has gone to sleep.]
CustosLimen has joined #ruby
amcoder has joined #ruby
<shevy>
oh yes... -v for ... verbose! :D
abucha_ has quit [Read error: Connection reset by peer]
banister has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
abucha has joined #ruby
htmldrum has joined #ruby
wpp has joined #ruby
<havenwood>
shortdudey123: -V for *more* verbose
<havenwood>
shortdudey123: oops, sry
<havenwood>
shevy: ^
startupality has quit [Quit: startupality]
<havenwood>
Why do you fail me, autocomplete?
schaerli has quit [Remote host closed the connection]
hololeap has joined #ruby
<adaedra>
Because the Fail key is so close to the Tab one.
ndrei has quit [Ping timeout: 252 seconds]
mercwithamouth has quit [Ping timeout: 250 seconds]
mxrguspxrt has joined #ruby
bruno- has joined #ruby
<SOLDIERz>
zenspider adaedra gregf_ okay I find out the reason why this was happening I don't know why but it seems chruby was pointing me to the major shared library libruby.so.2.2.0
blackmesa has quit [Ping timeout: 256 seconds]
<SOLDIERz>
which was not pointing to 2.2.2 it referred me too 2.2.1
nish1294 has joined #ruby
leat has quit [Ping timeout: 240 seconds]
<havenwood>
SOLDIERz: What do you get for?: command -v \ruby
pygospa has joined #ruby
leat has joined #ruby
<SOLDIERz>
take a se
<SOLDIERz>
c
nini1294 has quit [Ping timeout: 255 seconds]
<havenwood>
SOLDIERz: echo $RUBY_ROOT
tubuliferous has joined #ruby
<havenwood>
SOLDIERz: echo $RUBY_VERSION
rakm has joined #ruby
bruno- has quit [Ping timeout: 265 seconds]
<rakm>
hey, i install rbenv on centos and am attempting to install gem install bundler, but i get "/usr/local/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/config_file.rb:330:in `exist?': Insecure operation - exist? (SecurityError)"
<rakm>
any idea what the problem could be?
<folex>
Is there specific settings in RuboCop for detecting usage of undeclared variables?
tsujp has joined #ruby
<folex>
I was unable to find anything
<adaedra>
folex: the ruby -w flag
dr_bob has joined #ruby
BeatzKilla_ has left #ruby ["Konversation terminated!"]
<folex>
adaedra: the thing is, I'm running everything via cucumber/calabash, and I'm not really sure how to pass `-w' there.
tubuliferous has quit [Ping timeout: 240 seconds]
texasmade has quit [Ping timeout: 255 seconds]
<zenspider>
rakm: that sounds like your OS is preventing it? do you have it on lockdown or something? or something has set $SAFE > 0
bodgix has joined #ruby
<rakm>
yeah zenspider, i think it's a unix pemissions problem? not sure how to resolve though. i have rbenv install directory owned by the rbenv group and my current user is part of that group
ips|malc has joined #ruby
<zenspider>
it's in ruby. rb_stat is called by rb_file_exist_p
<adaedra>
folex: "It sets the $VERBOSE variable to true"
<adaedra>
folex: you will get noise from 3rd party libraries tho
<zenspider>
and rb_stat checks the $SAFE level
<zenspider>
rubygems doesn't set SAFE
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
KnownSyntax has quit [Read error: Connection reset by peer]
elia has joined #ruby
KnownSyntax has joined #ruby
<rakm>
zenspider this is all unfamiliar territory for me. how should i fix?
tvw has quit []
<zenspider>
not entirely sure how you got in that mess to begin with
<folex>
In the end, rubocop can't detect usage of undeclared variables?
<zenspider>
you JUST installed ruby via ruby-install ?
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
<zenspider>
folex: have you googled it?
<folex>
yeah, googling right now
senayar has quit [Remote host closed the connection]
<jgt>
there are people with more than two names, e.g., "John David Smith", in which case "John David" would be the first name
<bnagy>
o_0
<sevenseacat>
thats correct.
t_ has joined #ruby
<bnagy>
hand in your gun and badge
Outlastsheep is now known as zz_Outlastsheep
<sevenseacat>
i went to school with a girl, her first name was Amanda Louise, and she got so grumpy if you did not call her by her proper first name
<apeiros>
I like "40. People have names."
<apeiros>
"hi 7of9!"
<apeiros>
(it's a designation! not a name!)
<apeiros>
friend's name is anne catherine, single first name :)
PhantomSpank has joined #ruby
towski_ has joined #ruby
cajone has joined #ruby
stef204 has joined #ruby
<jgt>
so, I guess there's no way to use a regex to determine if a string contains only a single whitespace-delimited token, huh?
<ljarvis>
yes
<ljarvis>
there is
bruno- has joined #ruby
<apeiros>
I do have an assumption about names, though
<ljarvis>
jgt: scan(/\S+/).size
<apeiros>
people who do in fact appear as any point in the above list had to deal with enough shit from computerized systems that they have a canonical latin name :D
<apeiros>
(or will give you a canonical latin name)
<bnagy>
apeiros: nope
<pontiki>
we make names harder than they are. names are just names.
niiamon has joined #ruby
<jgt>
I'm sure there's a nerdy virgin out there who legally changed their name to "7" just to prove a point to other programmers about human names and software, but those sorts of people just do not exist in my set of data
chills42 has quit [Remote host closed the connection]
chills42 has joined #ruby
<pontiki>
is you set of data fixed?
<apeiros>
jgt: do they not exist because they could not be entered in the first place?
<bnagy>
apeiros: the people aren't always happy about being in databases (refugees etc)
<pontiki>
i.e., the set will never change?
<jgt>
the dataset may change, but it's really not that many humans
<jgt>
we're talking a few thousand average Joe Scandinavians
<bnagy>
still no reason to write oppressive code imho
towski_ has quit [Ping timeout: 240 seconds]
failshell has joined #ruby
<shevy>
freedom for code!
<jgt>
bnagy: cry me a river?
<bnagy>
when it's just as easy not to :P
n008f4g_ has quit [Quit: leaving]
<shevy>
jgt can you store exotic umlauts in your database?
<pontiki>
maybe those are the exotic umlauts shevy mentioned
<apeiros>
i,e, not all ¨ + char = umlaut
Violentr has quit [Ping timeout: 255 seconds]
<jgt>
apeiros: thanks for actually giving me an answer
<jgt>
:)
<havenwood>
shevy: String.downcase "Ö" #=> "ö"
<adaedra>
shevy: I hope this hell never comes.
<apeiros>
jgt: you are welcome. I thought you had heard all the criticisms and were ready for an answer to throw it away frustratedly because it won't cover it all anyway ;-)
<shevy>
just like the invisible unicode character... the invisible umlaut
Sapna has quit [Ping timeout: 272 seconds]
vdamewood has joined #ruby
omegamike has joined #ruby
<bnagy>
you could use it to add \m/etal to band names without making them confusing to spell
<pontiki>
wher's the fun in that?!?!
<apeiros>
møtørhëäd?
<jgt>
shevy: invisible unicode characters are a real problem for the data I'm working with. Most of the people using the system use OSX, which is an OS that makes it very easy to type nbsp chars
<havenwood>
bnagy: \m/ëtäl
<shevy>
them be evil a people, them macsters
<apeiros>
jgt: haha, tell me about it… I have a piece in my pry-/irbrc which strips nbsp from input
ndrei has quit [Ping timeout: 252 seconds]
<abdulrehman>
I'm having a small problem, I am getting a numeric from the DB and its really long, I need to round it to 10 and display it in float, but when the value is negetive it still shows as exp value like this; 1.83046e-05 even though I have indicated to_i , anyadvice?
<apeiros>
abdulrehman: printf/sprintf
<jgt>
shevy: definitely. I considered switching to Arch recently, but AFAICT the Linux kernel doesn't have drivers for the FacetimeHD camera
Sapna has joined #ruby
sarkyniin has quit [Ping timeout: 246 seconds]
eGGsha has joined #ruby
<abdulrehman>
apeiros: I am saving the value to a key in a hash,
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<apeiros>
abdulrehman: rounded floats as a hash key? ok… but I don't see how that changes your question.
<abdulrehman>
no no, I am not rounding a float as a hash key, the rounding for the value of the key
niiamon1 has joined #ruby
<apeiros>
I don't even.
<shevy>
jgt aha, well if you are ever ready, jhass here also uses arch \o/
<abdulrehman>
but I have noticed that thhe same thing is working in the other value but not for some ungodly reason with one of them
<workmad3>
vali: user nagios != environment that the nagios daemon is running in
<workmad3>
vali: by logging in as the user, you triggered a login shell, which would have activated RVM... the daemon won't be an interactive login shell, which won't trigger RVM
rsc___ has quit [Quit: rsc___]
<vali>
ok...how could I make it trigger an env update or export that path ?
<workmad3>
vali: two things you could do... you could generate a wrapper for the ruby binary that loads the RVM environment when run... I think RVM has docs for that on rvm.io (look for 'wrappers'). Or you could alter the nagios daemon init script and make sure RVM is loaded there
<havenwood>
vali: The wrappers workmad3 mentioned create the proper env vars for you.
<workmad3>
vali: and I can't see from that how the nagios daemon is being made into a daemon... frequently that's done in a way that can reset the environment...
<workmad3>
wrapper script would be the best solution
<havenwood>
vali: See the cron or god examples on rvm.io.
jcp has quit [Ping timeout: 246 seconds]
<shevy>
hmm error of today... rescue LoadErrors; end
<workmad3>
(barring using something like chef or puppet to generate init scripts that stamp the entire environment out for you)
<vali>
trying to find some info on how to make a wrapper..
dblessing has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
niiamon has joined #ruby
Silox| has joined #ruby
Igorshp has quit [Remote host closed the connection]
rsc___ has joined #ruby
abucha has quit [Ping timeout: 260 seconds]
<havenwood>
vali: It's an area of docs that could really be improved for RVM. They wrappers docs are spread around under init.d, cron, god, etc. The gem-wrappers gem is the RVM internal: https://github.com/rvm/gem-wrappers#readme
rdark has quit [Read error: Connection reset by peer]
<abdulrehman>
apeiros: I looked up the sprintf pretty strong, but one question if I may, how to make the 00s after the decimal point optional, so if zeros don't show, only show if there is numbers, currently doing this : sprintf("%.10f",12.222) which displays this 12.2222000000
dimasg has joined #ruby
<wasamasa>
use g instead of f
<wasamasa>
assuming ruby has stolen sprintf from C
<adaedra>
“stolen”
niiamon has quit [Ping timeout: 246 seconds]
<apeiros>
abdulrehman: I'm not sure that's possible
<apeiros>
abdulrehman: and usually you should indicate the precision of your numbers
niiamon has joined #ruby
<abdulrehman>
you mean for what before the decimal point ?
<abdulrehman>
wasamasa: it worked the way you said
niiamon1 has quit [Read error: Connection timed out]
<[k->
hello, we must round off everything to 3 s.f in science!
<abdulrehman>
[k-: this isn't science, I work for an evil corp and they want it to the nears 10 decimal places lol
<apeiros>
abdulrehman: having the trailing zeroes shows the precision to which you round
<abdulrehman>
oh ok, so you are saying keeping the zeros is fine?
<apeiros>
and that's how it should be. if you are to round to a given number of digits, trailing zeroes should be there.
<apeiros>
yes
<[k->
precision should be 3sf if it processed or to the precision of the instrument!
<apeiros>
it's a sad thing we don't have an indicator character for rounding.
<abdulrehman>
apeiros: that's logical, and make sense,
<apeiros>
[k-: not helping.
brotspinne has joined #ruby
axl_ has quit [Ping timeout: 245 seconds]
<[k->
but, science! (ok this is my last sentence about precision)
<abdulrehman>
haha
juanpaucar has joined #ruby
<workmad3>
[k-: it is the precision of the instrument... the financial instrument :P
sdothum has joined #ruby
<workmad3>
abdulrehman: at least, I'm guessing this is still to do with numbers related to stocks? :)
<abdulrehman>
ya, all my work is around these types of instruments.... the problem is that my code feed into another software so I can't make up my own spec
<abdulrehman>
although I'd love to
firoxer has quit [Ping timeout: 256 seconds]
wpp has quit []
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
Muhannad has joined #ruby
f3ttX] has joined #ruby
ashleyw has joined #ruby
Igorshp has joined #ruby
lannonbr has joined #ruby
niiamon1 has quit [Quit: Leaving.]
niiamon has quit [Remote host closed the connection]
axl_ has joined #ruby
<[k->
let the financial experts do it
<ashleyw>
hey, is the only solution for thread safe local variables in threads to use Thread.current? Is there a better way so my method isn't littered with so many Thread.current[:blahs]?
<[k->
you can push the blwme to them then!
<abdulrehman>
[k-: true that
cheeti has joined #ruby
<cheeti>
hi
<adaedra>
hi
zeeraw has quit [Ping timeout: 246 seconds]
<[k->
hi
arup_r has quit [Read error: Connection reset by peer]
arup_r_ has joined #ruby
ips|malc has joined #ruby
mack25 has joined #ruby
nini1294 has joined #ruby
<cheeti>
i am trying to build new gem locally, i build the gem using bundle gem your_gem_name command. how to install this gem in my local machine
<cheeti>
adaedra i am trying to build new gem locally, i build the gem using bundle gem your_gem_name command. how to install this gem in my local machine
dimasg has quit [Ping timeout: 240 seconds]
<adaedra>
was the hl really necessary
rdark has quit [Read error: Connection reset by peer]
<cheeti>
[k- i am trying to build new gem locally, i build the gem using bundle gem your_gem_name command. how to install this gem in my local machine
joonty has quit [Quit: joonty]
arturmartins has quit [Quit: Leaving...]
brotspinne has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k->
?anyone
<ruboto>
Just ask your question, if anyone has or can, they will respond.
ishahnaz has joined #ruby
mightymike has joined #ruby
but3k4 has joined #ruby
mary5030 has joined #ruby
nish1294 has quit [Ping timeout: 246 seconds]
<mightymike>
hi all
<[k->
hi
Sapna has joined #ruby
<mightymike>
first time usin irc :P
<adaedra>
so far so good
<mightymike>
what is the purpose of an irc ?
<cheeti>
i am trying to build new gem locally, i build the gem using bundle gem your_gem_name command. how to install this gem in my local machine
vt102 has quit [Remote host closed the connection]
juanpablo______ has joined #ruby
allcentury has quit [Ping timeout: 255 seconds]
alex88 has quit [Quit: Bye bye]
Hobbyboy has quit [Quit: I think the BNC broke.]
mightymike has left #ruby ["Leaving"]
firoxer_ has joined #ruby
niiamon has joined #ruby
niiamon1 has joined #ruby
<workmad3>
cheeti: gem install <filename>
<vali>
thank you for the support guys
<vali>
using the wrapper works as expected :)
ips|malc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
niiamon1 has quit [Read error: Connection reset by peer]
juanpablo______ has quit [Ping timeout: 256 seconds]
<cheeti>
workmad3 it's giving ERROR: Could not find a valid gem 'xxxxx' (>= 0) in any repository
mercwithamouth has joined #ruby
leslie has joined #ruby
leslie has joined #ruby
niiamon has quit [Ping timeout: 240 seconds]
niiamon has joined #ruby
carlosoliveira has joined #ruby
dr_bob has quit []
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
firoxer_ has left #ruby [#ruby]
startupality has joined #ruby
DoubleMalt has quit [Ping timeout: 264 seconds]
mary5030 has quit [Ping timeout: 250 seconds]
momomomomo has joined #ruby
quimrstorres has quit [Remote host closed the connection]
emilkarl has joined #ruby
ynroot has quit [Ping timeout: 240 seconds]
<shevy>
the name of the gem probably does not exist
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
ips|malc has joined #ruby
joonty has joined #ruby
<shevy>
if you have a .gem file, try
abucha_ has quit [Quit: Leaving...]
<shevy>
gem install ./name_of_gem_file_here.gem
htmldrum has quit [Ping timeout: 244 seconds]
failshell has joined #ruby
allcentury has joined #ruby
Hobbyboy has joined #ruby
scripore has joined #ruby
failshell has quit [Remote host closed the connection]
eGGsha has joined #ruby
[k-_ has joined #ruby
dimasg has joined #ruby
alex88 has joined #ruby
alex88 has joined #ruby
alex88 has quit [Changing host]
alex88 has joined #ruby
dstarh has joined #ruby
livathinos has quit [Ping timeout: 260 seconds]
Yiota has joined #ruby
boobi has joined #ruby
Ropeney has joined #ruby
sysx1000 has quit [Quit: drive never ends]
senayar has quit [Remote host closed the connection]
Zai00 has quit [Quit: Zai00]
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
TvL2386 has joined #ruby
prestorium has joined #ruby
sankaber has joined #ruby
Ropeney has quit [Client Quit]
boobi has quit [Client Quit]
mack25 has quit [Ping timeout: 240 seconds]
niiamon has quit [Read error: Connection timed out]
failshell has joined #ruby
niiamon has joined #ruby
cheeti has quit [Quit: Page closed]
Sapna has quit [Ping timeout: 246 seconds]
riscky has joined #ruby
dfockler has joined #ruby
mercwithamouth has quit [Ping timeout: 255 seconds]
piotrj has quit [Ping timeout: 264 seconds]
tkuchiki has joined #ruby
chills42 has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 264 seconds]
Soda has joined #ruby
chouhoulis has joined #ruby
sankaber has quit [Ping timeout: 240 seconds]
dfockler has quit [Ping timeout: 252 seconds]
A124 has joined #ruby
elia has quit [Read error: Connection reset by peer]
elia has joined #ruby
rsc___ has quit [Quit: rsc___]
tkuchiki has quit [Ping timeout: 244 seconds]
last_staff has quit [Ping timeout: 255 seconds]
brotspinne has joined #ruby
sgambino has joined #ruby
brotspinne has quit [Client Quit]
scripore has quit [Quit: This computer has gone to sleep]
bmurt has joined #ruby
bustrarm has joined #ruby
ips|malc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davejlong has joined #ruby
jxL has quit [Quit: Saliendo]
ips|malc has joined #ruby
ndrei has joined #ruby
olistik has joined #ruby
gix has quit [Quit: Client exiting]
niiamon has quit [Read error: Connection timed out]
busterarm has quit [Ping timeout: 260 seconds]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
niiamon has joined #ruby
Sapna has joined #ruby
cornerma1 has joined #ruby
DoubleMalt has joined #ruby
pdoherty has joined #ruby
gix has joined #ruby
niiamon_ has joined #ruby
senayar has quit [Remote host closed the connection]
Zai00 has joined #ruby
chills42 has joined #ruby
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
niiamon has quit [Ping timeout: 246 seconds]
startupality has quit [Quit: startupality]
ashleyw has quit [Quit: ashleyw]
cornerman has quit [Ping timeout: 252 seconds]
cornerma1 is now known as cornerman
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
rsc___ has joined #ruby
niiamon_ has quit [Ping timeout: 244 seconds]
niiamon has joined #ruby
momomomomo has quit [Quit: momomomomo]
scripore has joined #ruby
shortCircuit__ has joined #ruby
<shortCircuit__>
hi
startupality has joined #ruby
<[k-_>
hi
Zai00 has quit [Quit: Zai00]
Sapna has quit [Ping timeout: 264 seconds]
Zai00 has joined #ruby
ips|malc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shortCircuit__>
I want to create a simple ORM kind of wrapper around redis. presently I had this. https://gist.github.com/aghosh47/4b74408bf86eaceec882 but the methods are very implementation specific. I could do something like only the barebone structure like in th eInstanceMethods I have create_sorted_set , and then create_list, create_set .. and then have the implementation specific call. with maybe with instance_eval and lambdas. help with ideas please
allcentury has quit [Quit: WeeChat 1.2]
mercwithamouth has joined #ruby
victortyau has joined #ruby
Sapna has joined #ruby
rsc___ has quit [Quit: rsc___]
riscky has quit [Quit: riscky]
rsc___ has joined #ruby
Zai00 has quit [Quit: Zai00]
troulouliou_div2 has joined #ruby
melter has quit [Quit: Client exiting]
rsc___ has quit [Client Quit]
eminencehc has joined #ruby
schaerli_ has joined #ruby
decoponio has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<infernix>
if foo can be Nil or a string and bar can be Nil or an Array, how can I get a count from both these variables without a lot of ugly if/else? e.g. possible values for foo.count and bar.count could be 0+0, 1+0, 0+5, 1+5
shortCircuit__ has quit [Ping timeout: 250 seconds]
ndrei has quit [Ping timeout: 260 seconds]
hfp has quit [Ping timeout: 244 seconds]
jas02 has quit [Quit: jas02]
<infernix>
i seem to be needing a lot of lines for this and there must be a neat and short way
hfp_work has quit [Ping timeout: 265 seconds]
<apeiros>
a) ensure they're never nil
<apeiros>
b) var && var.count
axl__ has joined #ruby
serivich has joined #ruby
jas02 has joined #ruby
<jhass>
(var && var.count) || 0
<[k-_>
c) there is no such thing as Nil
<jhass>
but yeah, show your real code so we can show you how they can't become nil
hfp_work has joined #ruby
davejlong has quit [Remote host closed the connection]
hfp has joined #ruby
davejlong has joined #ruby
tjohnson has joined #ruby
<apeiros>
c) extract count into a method
jas02 has quit [Client Quit]
senayar has quit [Remote host closed the connection]
<jhass>
d) use .size if you don't pass an argument or block to count
<apeiros>
that code does not belong into the template
<infernix>
I have no control over config.disks or env*
kies^ has joined #ruby
davejlong has quit [Ping timeout: 244 seconds]
jobewan has joined #ruby
<apeiros>
your view should just read "<boot order='<%= @boot_order %>'/>
<apeiros>
+"
hfp has quit [Ping timeout: 272 seconds]
<apeiros>
you create unmaintainable and untestable templates this way
Zai00 has quit [Quit: Zai00]
<jhass>
well, <% if @boot_order %><boot order='<%= @boot_order %>' /><% end %> is okay too
aganov has quit [Remote host closed the connection]
<apeiros>
true, the code has elsifs without else.
hfp_work has quit [Ping timeout: 265 seconds]
<ljarvis>
also, there's duplicate code in their that's super confusing
sanguisdex has joined #ruby
<adaedra>
did you a word
bruno- has joined #ruby
<infernix>
i agree that it gets ugly. so I'll get that out of the template and set up vars in the code that invokes it
hfp has joined #ruby
blackmesa has joined #ruby
<apeiros>
when you've done that, we can talk about the code ;-)
hfp_work has joined #ruby
<jhass>
remember to show the code you end up with for doing that
sanguisdex has left #ruby [#ruby]
<infernix>
i think i'm going to have to throw the entire thing out and apply boot ordering in a separate class to make this work nicely and make it readable
Zai00 has joined #ruby
<ljarvis>
a separate class sounds smart
<apeiros>
famous last words
<ljarvis>
easy to unit test
senayar has quit [Remote host closed the connection]
* ljarvis
expects infernix back in 6 weeks tired and fed up with some new code
senayar has joined #ruby
<ljarvis>
"folk's, i re-wrote everything"
bruno- has quit [Ping timeout: 252 seconds]
momomomomo has quit [Quit: momomomomo]
<infernix>
ha. first dinner, then back to hacking, give me a few hours and i'll link a PR :>
davejlong has joined #ruby
Zai00 has quit [Client Quit]
paulcsmith has joined #ruby
Zai00 has joined #ruby
paulcsmith has quit [Client Quit]
carlosoliveira has quit [Quit: Connection closed for inactivity]
scripore has quit [Quit: This computer has gone to sleep]
malcolmva has quit [Ping timeout: 260 seconds]
weemsledeux has joined #ruby
paulcsmith has joined #ruby
davejlon_ has joined #ruby
Zai00 has quit [Client Quit]
davejlong has quit [Read error: Connection reset by peer]
tennis_ has joined #ruby
tenderlove has quit [Ping timeout: 240 seconds]
pandaant has joined #ruby
Zai00 has joined #ruby
tenderlove has joined #ruby
valetudo has quit [Ping timeout: 244 seconds]
railsraider has quit [Ping timeout: 252 seconds]
scripore has joined #ruby
michaeldeol has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
<bazbing81>
i only want to match 'fish' and 'frog' in this regex: http://rubular.com/r/eIfu52x3kM The sections where cat is preceeded by one whitespace character don't get matched, as expected. So I change up \s to \s* to make it work and now it's invalid? http://rubular.com/r/lGyAMW6fXN
<bazbing81>
sorry wrong links hold on
<jhass>
bazbing81: yeah, lookarounds must be fixed width
<ljarvis>
well that exact example does, but it's awfully restrictive and tells me this isn't for a real world thing
juanpablo______ has quit [Quit: (null)]
allomov has quit [Remote host closed the connection]
tubuliferous has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<bazbing81>
trying hard not to find out where the person who invented regex lives and murdering him
<bazbing81>
well maybe not murder. just saying "whhhhyyy"
<[k-_>
it's your own fault that you fail at regex!
<ljarvis>
[k-_: that's not very nice
<[k-_>
he wanted to murder someone
<ljarvis>
bazbing81: regexp is nice and powerful once you get past the headache
juanpablo______ has joined #ruby
tuelz has quit [Ping timeout: 252 seconds]
txdv_ has joined #ruby
<txdv_>
who do ruby blocks do not support inline rescue?
malcolmva has joined #ruby
riotjones has joined #ruby
<ljarvis>
txdv_: no
casadei_ has joined #ruby
juanpablo______ has quit [Read error: Connection reset by peer]
<txdv_>
what no ljarvis ?
Igorshp has quit [Remote host closed the connection]
<txdv_>
why*
Philipp__ has quit [Read error: Connection reset by peer]
<bazbing81>
ljarvis yep...I'd be very much in love with it if I could variable length lookaheads. maybe a gem?
<txdv_>
i want to know why not that it doesnt
<txdv_>
i know that it doesnt
juanpablo______ has joined #ruby
<[k-_>
use begin..end blocks
<ljarvis>
txdv_: ask matz
<txdv_>
[k-_: they look disgusting
<[k-_>
too bad
<txdv_>
what too bad
<[k-_>
languages have limits
<txdv_>
ruby is all about looking sexy
<txdv_>
and not like your grandmas java
<nzst>
Hi, has a convention on adding a ! to the end of a function name ever been set? last I was reading it was side effect will be produced or an exception will be raised
<[k-_>
haskell is more sexy than ruby
<txdv_>
pfff
<[k-_>
nzst: yes, it means that the method is "dangerous"
<txdv_>
imperative asshole
<apeiros>
nzst: as per matz: "!" denotes a method which you should be careful
snockerton has joined #ruby
<[k-_>
haskell is not imperative
<ljarvis>
nzst: the exception raised thing is more of a rails tradition. In Ruby it's (usually) used to signify the receiver is being modified. Really though it's just "caution"
<[k-_>
haskell is functional
<txdv_>
i mean functional
<apeiros>
txdv_: language
<nzst>
thanks all
<apeiros>
txdv_: *watch your language
<[k-_>
"i mean functional"
<ljarvis>
?ot [k-_ txdv_
<ruboto>
[k-_, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<txdv_>
functional git!
<txdv_>
Is that ok?
<jhass>
!mute txdv_
<jhass>
they're only here to troll, already banned
txdv_ has left #ruby [#ruby]
tubuliferous has quit [Ping timeout: 244 seconds]
<[k-_>
"imperative"
djstorm has joined #ruby
Hounddog has quit [Remote host closed the connection]
<adaedra>
:/
baroquebobcat has quit [Quit: baroquebobcat]
<[k-_>
arent blocks also introduced to be more functional
halflife has joined #ruby
werelivi_ has quit [Remote host closed the connection]
<halflife>
Hellow fellas, I have a totally unrelated question to question that was asked here before, does anybody know why ruby blocks do not have inline rescues like functions do?
<jhass>
really, so bored?
<jhass>
!mute halflife
<halflife>
jhass: excuse me my language
casadei_ has quit [Ping timeout: 244 seconds]
<yorickpeterse>
jhass: you know they're just going to change their nick again right?
marr has joined #ruby
halflife has left #ruby [#ruby]
Ilyas has joined #ruby
<jhass>
yorickpeterse: yeah, they proxy though
halflife2 has joined #ruby
<jhass>
not much we can do
riotjones has quit [Ping timeout: 272 seconds]
<bazbing81>
yorickpeterse halflife 3 confirmed
<yorickpeterse>
jhass: you can start by just banning the host
<yorickpeterse>
seems to be the same
<halflife2>
everytime someone mentions halflife 2 + 1, it gets delayed by one month
<halflife2>
please dont make me do it
halflife2 was kicked from #ruby by apeiros [halflife2]
Igorshp has joined #ruby
<yorickpeterse>
ail
<yorickpeterse>
* hail
<jhass>
yorickpeterse: this time, didn't match with txdv_
<yorickpeterse>
oh hm
juanpablo______ has quit [Ping timeout: 265 seconds]
<jhass>
chris2: ^ check your channel too and consider if you still want such people inside it
halflife3 has joined #ruby
riotjone_ has joined #ruby
<busterarm>
lol
<[k-_>
but is there a reason actually?
livathinos has quit []
juanpablo______ has joined #ruby
<halflife3>
to be fair my last time i got my mute was minimal trolling
<halflife3>
the admins had rather a bad day
<adaedra>
-_-
<demophoon>
...
<halflife3>
i apologize non the less
<yorickpeterse>
Interesting way of saying "fuck yo ban"
<[k-_>
ban evasion is against the network rules
werelivinginthef has joined #ruby
<busterarm>
He's got his hammer pants on
momomomomo has joined #ruby
tmtwd has joined #ruby
rcvalle has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
<busterarm>
i mean, they've got their.. :(
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CloCkWeRX has quit [Quit: Leaving.]
tuelz has joined #ruby
halflife3 has left #ruby [#ruby]
blackmesa has quit [Ping timeout: 260 seconds]
halflife3 has joined #ruby
<[k-_>
.___.
<halflife3>
i always the type the wrong channel first
tenderlove has joined #ruby
startupality has quit [Quit: startupality]
juanpaucar has quit [Remote host closed the connection]
NeverDie has joined #ruby
gagrio has quit [Ping timeout: 246 seconds]
<adaedra>
I suppose you won't if we ask you kindly to get out?
<yorickpeterse>
jhass: +b *!*@cs.iti.l
niiamon has joined #ruby
<yorickpeterse>
err
<yorickpeterse>
jhass: +b *!*@cs.iti.lt
<yorickpeterse>
it's a games server so it doesn't really hurt
<adaedra>
yorickpeterse: it's his 3rd host, won't change much, I guess
halflife3 was kicked from #ruby by apeiros [bye]
shock_one has quit [Remote host closed the connection]
<yorickpeterse>
adaedra: assuming they don't have a botnet they'll lose the game eventually
<apeiros>
adaedra: dunno, most people have limited supply of non-dynamic ips
<jhass>
was worth a shot whether they figure out realname bans :P
shock_one has joined #ruby
startupality has joined #ruby
<yorickpeterse>
I wonder if there would be a way to have a bot auto ban people based on this pattern of message -> banned -> rejoin, similar message
<yorickpeterse>
though it would be pretty hard to do right
<yorickpeterse>
omg skynet
<apeiros>
but granted, penny-wise paymend for DO boxes and the like doesn't help with a dedicated troll :)
Contigi has joined #ruby
Kully3xf_ has joined #ruby
g0rx_ has quit [Remote host closed the connection]
spastorino has quit [Remote host closed the connection]
troter___ has quit [Remote host closed the connection]
heidar has quit [Remote host closed the connection]
ckrailo has quit [Remote host closed the connection]
amitchellbullard has quit [Remote host closed the connection]
ponga has quit [Remote host closed the connection]
mrsolow has quit [Read error: Connection reset by peer]
nickfausnight has quit [Remote host closed the connection]
zrl has quit [Remote host closed the connection]
ss_much has quit [Remote host closed the connection]
<adaedra>
they have so many resources
TheHodge has quit [Remote host closed the connection]
rflot has quit [Remote host closed the connection]
mroth has quit [Write error: Broken pipe]
PhilK has quit [Remote host closed the connection]
zemmihates has quit [Remote host closed the connection]
neektza has quit [Write error: Broken pipe]
petems has quit [Remote host closed the connection]
akahn has quit [Write error: Connection reset by peer]
culturelabs has quit [Write error: Broken pipe]
dukedave has quit [Remote host closed the connection]
ramblinpeck has quit [Write error: Broken pipe]
AdamMeghji has quit [Write error: Broken pipe]
momomomomo has quit [Quit: momomomomo]
<apeiros>
yorickpeterse: I wish irc would allow a pre-screening hook
<adaedra>
if only they used it for good.
ixti has joined #ruby
halflife3 has joined #ruby
<yorickpeterse>
apeiros: it's called nick registration
<yorickpeterse>
worked pretty well in #ruby-lang for a while :P
<apeiros>
yorickpeterse: not doing even half of what I'd want
<apeiros>
and we discussed nick-reg.
<jhass>
bazbing81: so, might indeed be easier to just .reject lines that .include?("cat") :/
<[k-_>
+bb halflife*!*@* *!*@cs.iti.lt
<shevy>
pre-screening hook ... pre-crime... ah this science fiction movie!
<yorickpeterse>
I think that's the one thing I like about Gitter: it's tied into your Github account
<adaedra>
it gets the result of whatever the result of the expression at right of assignation is
prefixed has quit [Remote host closed the connection]
<adaedra>
er, value, not result, for the first one
bestie has joined #ruby
rakm has joined #ruby
c0m0 has quit [Ping timeout: 244 seconds]
hahuang65 has quit [Ping timeout: 244 seconds]
prefixed has joined #ruby
christiandsg has joined #ruby
JoshL has quit []
towski_ has quit [Remote host closed the connection]
neektza has joined #ruby
<mwksl>
I'm trying to figure out a way to emulate running something to the effect of "curl -F "file=@file.txt" https://url.com" (submit form via curl) are there any gems or methods you folks would recommend?
towski_ has quit [Read error: Connection reset by peer]
<adaedra>
mwksl: to be curl-like.
jxf has joined #ruby
towski_ has joined #ruby
A124 has quit [Ping timeout: 264 seconds]
alekst_ has joined #ruby
<havenwood>
mwksl: Libcurl is quite fast.
baweaver has quit [Remote host closed the connection]
dmolina has joined #ruby
<adaedra>
also, I heard Net::HTTP is not the easiest option.
<mwksl>
:) I'll accept that answer. Thank you! I'll see what I can muster up.
<momomomomo>
uh the main reason is that it's also thread safe
A124 has joined #ruby
<momomomomo>
I thought
scripore has quit [Quit: This computer has gone to sleep]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
mwksl: There are wrappers around Net::HTTP like RestClient, HTTParty, etc. Or pure Ruby options like HTTPClient and Excon. There are a bunch of good HTTP clients in Ruby.
<momomomomo>
or use Faraday, and switch out for whatever implementation you want
<havenwood>
mwksl: Faraday supports multiple backends. Typhoeus is another libcurl wrapper that focuses on parallel requests.
pauly_oc has joined #ruby
unshadow has quit [Ping timeout: 265 seconds]
<havenwood>
mwksl: And the final one I'll mention (though there are plenty more that are worth mentioning) is HTTP.rb, which has nice interface in particular.
nsuke has quit [Remote host closed the connection]
<adaedra>
I wonder if someone already made one of these flowcharts to choose a Ruby HTTP library
DexterLB has joined #ruby
j4cknewt_ has joined #ruby
<imperator>
choose wisely
<havenwood>
adaedra: that'd be good - there're spreadsheets to use to make one
<mwksl>
curb seems like the easiest option. I have one (admittedly stupid) question: In their example they use "c.http_post(Curl::PostField.file('thing[file]', 'myfile.rb'))" What is the 'thing[file]' referring to? I would assume that would be the name of the form field?
<imperator>
preferably one that doesn't use timeout
Sapna has joined #ruby
<momomomomo>
mwksl: yes
Papierkorb has joined #ruby
ttilley has joined #ruby
michaeldeol has quit [Ping timeout: 244 seconds]
<momomomomo>
so for @thing
bttf has joined #ruby
<momomomomo>
the :file would be in thing[file] as its name on the page
troulouliou_div2 has quit [Quit: Leaving]
<adaedra>
time to go~
serivich has joined #ruby
stef204 has quit [Ping timeout: 272 seconds]
<mwksl>
Ahh, so to emulate curl -F "file=@file.txt" I could just do c.http_post(Curl::PostField.file('file', 'myfile.rb'))?
j4cknewt has quit [Ping timeout: 246 seconds]
<mwksl>
Assuming it takes care of the proper formatting?
<momomomomo>
I don't know that gem
k3asd` has joined #ruby
<dudedudeman>
curl baby, burl
towski_ has quit [Read error: Connection reset by peer]
<dudedudeman>
ugh, curl*
niiamon has quit [Read error: Connection timed out]
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
towski_ has joined #ruby
ss_much has joined #ruby
michaeldeol has joined #ruby
tubuliferous has joined #ruby
g0rx_ has joined #ruby
<mwksl>
Unfortunately the documentation seems a little poor. Or, rather, I think it assumes a lot of background knowledge that I liack.
<mwksl>
lack *
Notte has joined #ruby
sepp2k has quit [Quit: Leaving.]
cbednarski has joined #ruby
niiamon has joined #ruby
niiamon_ has joined #ruby
ttilley has quit [Read error: Connection reset by peer]
ttilley has joined #ruby
Sapna has quit [Ping timeout: 255 seconds]
ttilley has quit [Changing host]
ttilley has joined #ruby
shadoi has joined #ruby
michael_mbp has quit [Excess Flood]
mikecmpbll has joined #ruby
<craysiii>
morning.
Zai00 has quit [Quit: Zai00]
zemmihates has joined #ruby
michael_mbp has joined #ruby
michael_mbp has quit [Excess Flood]
kidoz has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
michael_mbp has joined #ruby
A124 has quit [Ping timeout: 264 seconds]
tubuliferous has quit [Ping timeout: 250 seconds]
niiamon has quit [Ping timeout: 255 seconds]
f3ttX] has quit [Remote host closed the connection]
niiamon has joined #ruby
heidar has joined #ruby
banister has joined #ruby
TeresaP has joined #ruby
nzst has joined #ruby
<TeresaP>
I'm having trouble trying to use the json gem. According to documentation, when I do JSON.parse(string version of json), I should get a hash, but I get an array instead.
<TeresaP>
Anyone know what the cause of that might be?
<TeresaP>
Do I really have to loop through each item if I want to find something?
<imperator>
busterarm, we use it, but the number of issues and open pr's concerns me
eminencehc has joined #ruby
tuelz has joined #ruby
imfilp has joined #ruby
Guest78802 has joined #ruby
<busterarm>
imperator: interesting. there's also mechanize
<mwksl>
Just an update
<mwksl>
I ended up using the 'rest_client' gem
<imperator>
busterarm, well, that's got a different goal
<busterarm>
true
<mwksl>
and did this "c = RestClient.post('https://url' :file => File.new('test.txt', "rb"))"
<imperator>
i think Faraday is another popular one
EllisTAA has quit [Quit: EllisTAA]
<TeresaP>
The JSON has a bunch of elements/(names?) called "entityType" and I want to find all entityTypes that match the value "foo"
<bricker>
I'm going to ask this just to start a discussion as I benchmark in parallel: I'm using a "group by" query (mysql) to return unique records based on a specific column... Has anybody found that doing this is faster/slower than just .uniq(), over average 400 objects?
failshell has quit [Remote host closed the connection]
lxsameer has joined #ruby
lxsameer has joined #ruby
<dfockler>
TeresaP: if you start with a json array, you end up with a ruby array
<TeresaP>
thanks dfockler
drewo has quit [Ping timeout: 264 seconds]
<TeresaP>
I suppose that makes sense
davejlong has joined #ruby
phutchins1 has joined #ruby
<busterarm>
httparty seems to be the only one with active development. rest-client is close though
<imperator>
if memory serves, httparty was using timeout
niiamon__ has joined #ruby
<imperator>
which is ick
phutchins has quit [Read error: No route to host]
niiamon has quit [Ping timeout: 240 seconds]
CustosLimen has quit [Ping timeout: 246 seconds]
<dfockler>
TeresaP: you can use Enumerable#select on the array to get the hashes you want
bronson has joined #ruby
<TeresaP>
Thanks dfockler :)
<bricker>
busterarm: httparty was proven to be very slow though
<bricker>
busterarm: unless you use the persistent variation which keeps the connection open
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rbowlby has quit [Remote host closed the connection]
<busterarm>
ahh, that's undesirable
<busterarm>
again, i usually use rest-client :)
umo20 has quit [Ping timeout: 265 seconds]
niiamon_ has quit [Read error: Connection timed out]
RobertBirnie has joined #ruby
atesec has quit [Read error: Connection reset by peer]
<shevy>
well what exactly do we mean with "typing"
<kully3xf>
tks
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<kully3xf>
it won't pull from source
<atmosx>
shevy: typing letters
<kully3xf>
super locked down
<jalcine>
^^
podman has joined #ruby
<atmosx>
shevy: like, you type with the fingers, with the nose, etc.
davejlon_ has joined #ruby
<shevy>
I wouldn't mind optional declarations of some variables to remain and are guaranteed to be something, like "@foo is always an array"
<shevy>
oohhhh
<shevy>
I type with my toes
<atmosx>
shevy: see?
<atmosx>
we should support toes officially
* atmosx
I feel it in my fingers, I feel it in my toeees
renanoronfle has quit [Ping timeout: 264 seconds]
Trynemjoel has quit [Ping timeout: 256 seconds]
hahuang65 has joined #ruby
<atmosx>
snow is all around us (it's 40 C here, but anyway) and so the feeling groww
<atmosx>
s
omegamike has joined #ruby
linuxboytoo has joined #ruby
[Butch] has quit [Read error: Connection reset by peer]
Trynemjoel has joined #ruby
lannonbr has quit [Quit: WeeChat 1.2]
lannonbr has joined #ruby
mrmargolis has quit [Ping timeout: 255 seconds]
nofxx has quit [Ping timeout: 240 seconds]
[Butch] has joined #ruby
<jalcine>
that would be nice to have in ruby
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
<jalcine>
not 100% needed tbh
yxhuvud has joined #ruby
<jalcine>
but very nice
davejlong has quit [Ping timeout: 252 seconds]
<atmosx>
if it would help us write less tests...
<atmosx>
anything goes
a1ph4g33k has joined #ruby
amclain has quit [Quit: Leaving]
olistik has joined #ruby
robbyoconnor has quit [Quit: Konversation terminated!]
yb_drowe has joined #ruby
dseitz has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
leesharma has quit [Ping timeout: 264 seconds]
k3asd` has quit [Ping timeout: 252 seconds]
mrmargolis has joined #ruby
<nofxx>
shevy, cute animal? are you a girl? can't think of anything more fun than a shark... only a hawk, and big cats
DoubleMalt has joined #ruby
<shevy>
nofxx a shark is an evil beast in the ocean
<nofxx>
shevy, disagree, the only evil beast in the ocean is man
bricker has quit [Quit: Lost terminal]
<shevy>
and he can't even swim!
blahwoop has joined #ruby
niiamon has quit [Read error: Connection timed out]
<dudedudeman>
i can swim!
<nofxx>
shevy, hehe, how's that?
<dudedudeman>
ruby
olistik has quit [Ping timeout: 240 seconds]
<TeresaP>
Anyone know what the equivalent of right-clicking individual files and compressing them is on OS X? I need a system call or some sort of ruby gem method
shock_one has quit [Remote host closed the connection]
<TeresaP>
Has to be exactly the same sort of compression
<nofxx>
TeresaP, that's confuse... you want to make a .zip in ruby?
shock_one has joined #ruby
niiamon has joined #ruby
<TeresaP>
yes nofxx, currently I do a system call to use 'ditto' (OS X) but it only takes one file or folder
<nofxx>
shevy, discovery teatch me that sharks bite hard but are kinda dumb. The orcas have the strenght and brains =D
sshuff is now known as sshuff|gone
decaff has quit [Remote host closed the connection]
MasterPiece has joined #ruby
<TeresaP>
I'd hate to have to create a temp folder and zip that
CustosLimen has quit [Ping timeout: 246 seconds]
phutchins2 has quit [Ping timeout: 256 seconds]
<nofxx>
TeresaP, which zip returns something?
<nofxx>
if not install it with homebrew
<TeresaP>
nofxx the problem isn't being able to zip, it's finding a way to zip that exactly mirrors what OS X does
RegulationD has joined #ruby
leesharma has joined #ruby
Notte has joined #ruby
pdoherty has quit [Ping timeout: 265 seconds]
<TeresaP>
I tried asking over on macdev too, but no luck
<nofxx>
TeresaP, what it does differently?
Notte has left #ruby [#ruby]
<TeresaP>
I don't know... something about how it compresses
<TeresaP>
I just know that's what I need. No one documents anything
shock_one has quit [Ping timeout: 244 seconds]
<TeresaP>
(On my team)
<nofxx>
TeresaP, I don't believe they are using anything different, else no one would unzip the files. Zip has a bunch of options, try the -h
<nofxx>
might ve some compression level or CR/LF thing
paulcsmith has quit [Read error: Connection reset by peer]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<TeresaP>
It does matter, because I tried using something awhile back that seemed identical and it wasn't
paulcsmith has joined #ruby
<dfockler>
TeresaP: you could use the zip command from a ruby program
<TeresaP>
I tried that one before
<TeresaP>
I'll look into the -h flag
ItSANgo has quit [Quit: Leaving...]
eminencehc has joined #ruby
renanoronfle has joined #ruby
<Ox0dea>
> The ditto command has a few idiosyncrasies that anyone who's coming from traditional UNIX and is used to cp might find distressing.
yqt has joined #ruby
tenderlo_ has quit [Read error: Connection reset by peer]
<TeresaP>
0x0dea I've been using ditto, but unfortunately the requirements have changed from a folder to individual files to be added to the zip
<TeresaP>
I'm cross referencing the list of files I need to add with a .xml file
swgillespie has joined #ruby
tenderlove has joined #ruby
<TeresaP>
Apparently ditto only takes 1 file OR 1 folder
CustosLimen has joined #ruby
<TeresaP>
So I guess I'm stuck copying files to a temp dir and deleting it after
tmtwd has quit [Read error: Connection reset by peer]
Rickmasta has joined #ruby
tmtwd has joined #ruby
leesharma has quit [Ping timeout: 244 seconds]
bruno- has joined #ruby
<Ox0dea>
TeresaP: You need only figure out which parameters ditto is using to perform the DEFLATE operation.
<TeresaP>
I'm using ditto -ck --rsrc --sequesterRsrc
leesharma has joined #ruby
<TeresaP>
0x0dea (forgot to tag)
<TeresaP>
oh, you have an O and 0
hool is now known as ZYPP
<TeresaP>
that's not confusing :)
<Ox0dea>
TeresaP: As has been mentioned, ditto can't be doing anything terribly idiosyncratic, else the resultant archives would be useless in other environments.
phrozen77 has joined #ruby
drPoggs has joined #ruby
elektronaut has joined #ruby
<TeresaP>
I believe it has something to do with how much it's compressing the images
Trieste has joined #ruby
soahccc has joined #ruby
krasnus has joined #ruby
centrx has joined #ruby
<Ox0dea>
> By default, ditto will use the default compression level as defined by zlib.
<adaedra>
you want to feel like a programmer, smoaking ?
<Ox0dea>
smoaking: Do the Ruby Koans.
nobitanobi has joined #ruby
<Ox0dea>
And then donate to the author(s), if you really want to use a paid resource.
bmurt has joined #ruby
tenderlo_ has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
<TeresaP>
oh hey zlib has a gem
tkuchiki has quit [Remote host closed the connection]
<TeresaP>
ty Ox0dea
tkuchiki has joined #ruby
lukas has joined #ruby
tuelz1 has quit [Ping timeout: 246 seconds]
mrmargolis has joined #ruby
leesharma has quit [Ping timeout: 244 seconds]
<Ox0dea>
Zlib is part of the standard library, but it's rather less featureful than rubyzip.
<a1ph4g33k>
TeresaP: ZLib is included when you compile Ruby.
<smoaking>
adeponte: i know 0 math ( i failed algebra in high school and gave up and dropped out of high school when i was 15) and now i want to become a programmer at 23
<a1ph4g33k>
^^^ what Ox0dea said.
ItSANgo has joined #ruby
werelivinginthef has quit [Remote host closed the connection]
<TeresaP>
:-S
bricker has joined #ruby
msnyon has joined #ruby
<TeresaP>
Ooh
mleung has quit [Quit: mleung]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<twohlix>
smoaking: so learn math now? depending on the type dev work you want to do you dont need to know crazy math, good luck.
<TeresaP>
zlib has a Zip.default_compression = Zlib::DEFAULT_COMPRESSION
<shevy>
is there a way to find out where a method was defined precisely? like in file foo.rb we have "def foo", so we can grep for it easily, but perhaps some dynamic methods are harder to find, such as a dynamic "define_method"; I'd kinda want to know where the method was first defined, in which case I could then open that file
<smoaking>
twohlix: i want to program web sites using ruby and rails and other languages and frameworks
fenjamin has joined #ruby
mrmargol_ has quit [Ping timeout: 246 seconds]
<TeresaP>
smoking first pick a project, then read up on the Ruby documentation that will support your ability to do that
<Ox0dea>
shevy: #source_location, no?
carlosoliveira has quit [Quit: Connection closed for inactivity]
<TeresaP>
damn autocorrect
<twohlix>
smoaking: your best bet is #rubyonrails then. If you want to learn how to get a rails project up and running there are some good things like: http://railsforzombies.org/
<diegoviola>
twohlix: I'm just suggesting him a way to start
<twohlix>
yes :)
<TeresaP>
smoaking it might be helpful to take a class on programming, so you get the gist of how to think about programming. From there, it's easy to learn multiple languages.
<twohlix>
i know im responding to his amazement something can be learned in a week
whippythellama_ has quit [Quit: WeeChat 1.2]
<diegoviola>
smoaking: do you know other languages?
grios has joined #ruby
<diegoviola>
smoaking: have you ever done any programming?
aphprentice has joined #ruby
skyrocker1 has joined #ruby
whippythellama has joined #ruby
nobitanobi has quit []
<Ox0dea>
smoaking: Play with Lego much as a child?
Kyuujitsu has quit [Client Quit]
<smoaking>
no i am too poor to have legos
FernandoBasso has quit [Ping timeout: 272 seconds]
Kyuujitsu has joined #ruby
<smoaking>
we played in the mud and shot squirrel as a kid
<a1ph4g33k>
shevy: I expect you saw Ox0dea ’s answer … method_source gem … the original answer ( and what method_source uses … is Method.source_location ( when available ).
<Ox0dea>
And yet here you are on the Internet.
mxrguspx_ has quit [Remote host closed the connection]
<twohlix>
Ah, trolling
<twohlix>
i had a hunch
<smoaking>
the government provides some money... i just want to change and better my life
tear has joined #ruby
tuelz1 has joined #ruby
<Ox0dea>
twohlix: Aye, I was going to issue a PSA that he oughtn't be fed. :/
<twohlix>
once he said math is irrelevant
<twohlix>
i was suspect
<smoaking>
i reckon i am able to become whatever i want to become and turn my life around
<smoaking>
twohlix: people have told me that programming does not require math
Kyuujitsu has quit [Client Quit]
rsc___ has quit [Quit: rsc___]
<smoaking>
they said you don't need math.... these are people that are programming node.js and other website stuff that i don't know a lick of yet
blahwoop has joined #ruby
tenderlove has joined #ruby
Mendenhall has quit [Ping timeout: 272 seconds]
nini1294 has joined #ruby
niiamon has quit [Read error: Connection timed out]
<blahwoop>
shevy: vim ctags
<twohlix>
So, even if i suspect you might be trollin, The only way I guarantee you'll learn how to program, is if there is some problem you're excited to solve that can be done through programming. Then you'll learn lots of crap around that and might follow some terrible practices but that'll get you started
tenderlo_ has quit [Read error: Connection reset by peer]
<twohlix>
good luck.
niiamon has joined #ruby
<wasamasa>
twohlix: you know, that says an awful lot about programming
<smoaking>
i just looked up "trollin" and i ain't "trollin" i'm serious.... i reckon there ain't much folk like me out here on the internet but i do want to change my life honest
yalue has quit [Quit: return 0;]
<Ox0dea>
blahwoop: Exuberant or Universal?
<TeresaP>
smoaking how did you end up in this chat
tear has quit [K-Lined]
<smoaking>
a guy i met at starbucks done showed me how get on this here chat
<blahwoop>
exuberant
<TeresaP>
smoaking I'm going to place you at 40-50 years old, no college experience?
<smoaking>
he said all them programmers and internet folk are on here
<Ox0dea>
smoaking: Your accent changed.
<TeresaP>
lol
hahuang65 has joined #ruby
werelivinginthef has joined #ruby
<blahwoop>
well the internet folks are everywhere
<a1ph4g33k>
Ox0dea: yeah it did.
<blahwoop>
not just here
<TeresaP>
definitely a troll
<Ox0dea>
Oui.
<smoaking>
TeresaP: i'm 28 years old
last_staff has quit [Quit: last_staff]
Guest70411 has joined #ruby
<Guest70411>
who's the cheapest ruby whore around?
<twohlix>
not me
<havenwood>
!mute Guest70411
<blahwoop>
lol u just said u were 23
<adaedra>
o.O
<havenwood>
smoaking: no trolling
<smoaking>
i once knew a gal named ruby who worked at the local strip joint
wldcordeiro_ has quit [Quit: Konversation terminated!]
smoaking has quit []
<wasamasa>
...
<TeresaP>
sheesh
<twohlix>
lol
<blahwoop>
i have the perfect source for u
wldcordeiro_ has joined #ruby
<blahwoop>
too bad he left
<blahwoop>
was goin to link him to why's guide
willharrison has joined #ruby
charliesome has joined #ruby
postmodern has joined #ruby
<twohlix>
shit I had never read why's guide, this is an hilarious intro
<shevy>
a1ph4g33k aha
ItSANgo has quit [Quit: Leaving...]
nzst has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<a1ph4g33k>
Source of the gem has helpers to try and find Proc, Method, & UnboundMethod objects …
tenderlove has quit [Read error: Connection reset by peer]
tenderlo_ has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
ips|malc has joined #ruby
nahtnam has joined #ruby
blaines has joined #ruby
yardenbar has joined #ruby
rehat has joined #ruby
tcrypt has joined #ruby
Jarboe has joined #ruby
djbkd has joined #ruby
allomov has quit [Remote host closed the connection]
<TeresaP>
Does FileUtils.touch not take a path to a file? Part of the path doesn't exist and it's choking on it, but the docs don't mention that limitation
<TeresaP>
I'm expecting too much, I guess
dopie has quit [Quit: This computer has gone to sleep]
chills42 has quit [Remote host closed the connection]
lannonbr has quit [Quit: WeeChat 1.2]
apfeluser has quit [Ping timeout: 252 seconds]
Rosa has joined #ruby
irctc902 has joined #ruby
apfeluser has joined #ruby
<jhass>
otoh that an operation on a file would create a bunch of directories would be kind of unexpected too, no?
<shevy>
you want to create a file in a path that does not exist? :)
<jhass>
it just fits your usecase better atm
<TeresaP>
Yes shevy
<TeresaP>
I want it to generate any missing parts
<jhass>
File.mkdir_p File.dirname path to the rescue
<shevy>
yeah so a combination with FileUtils.mkdir_p
<twohlix>
irctc902: client is never going to be available to your controller that way. In fact you know how your model instance gets instantiated in your controller?
<blahwoop>
u can't access the client variable
<blahwoop>
yea what twohlix said
diegoviola has quit [Ping timeout: 250 seconds]
<twohlix>
whereever you need parse. you'll need to make something like @parse_client so you can use it in your controller/views
<irctc902>
i see
tubuliferous has joined #ruby
loc22 has quit [Ping timeout: 246 seconds]
<twohlix>
Think of your parse clietn as a model. Since that is where data is coming from I bet, then treat it as a model
momomomomo has quit [Ping timeout: 260 seconds]
failshell has quit []
tvw has joined #ruby
diego___ has joined #ruby
momomomomo has joined #ruby
<irctc902>
got it, so i call @parse_client?
<twohlix>
no
<twohlix>
In your controller, you need to instantiate your parse client wherever you need it
dopie has joined #ruby
<irctc902>
how would i do that
diego__ has quit [Ping timeout: 240 seconds]
diego___ has quit [Changing host]
diego___ has joined #ruby
<blahwoop>
irctc902: u can use Parse directly inside your controler
<dorei>
when I do em::stop_server, is there an event that's being fired when server is actually stopped ?
diego___ is now known as diegoviola
<dorei>
EM::stop_server
tubuliferous has quit [Ping timeout: 246 seconds]
<blahwoop>
irctc902: Parse.create
niiamon_ has quit [Remote host closed the connection]
theery has quit [Remote host closed the connection]
<irctc902>
so i call Parse.create? but isnt that what the Parse.rb file is for?
niiamon_ has joined #ruby
lwu_ has quit [Quit: This computer has gone to sleep]
<blahwoop>
irctc902: if you're trying to create a wrapper
RobertBirnie has quit [Ping timeout: 260 seconds]
<blahwoop>
irctc902: u'll have to create a new class like ParseWrapper
<blahwoop>
irctc902: then u would still need to do ParseWrapper.new in your controller
<irctc902>
what im trying to do is to update,write,create, read data from parse, thats really it.
<blahwoop>
yup
RobertBirnie has joined #ruby
lwu_ has joined #ruby
<blahwoop>
irctc902: u might want to read up on some ruby first
Musashi007 has quit [Quit: Musashi007]
bodgix1 has joined #ruby
<twohlix>
also irctc902: #rubyonrails is generally better for rails specific questions
niiamon_ has quit [Ping timeout: 240 seconds]
FernandoBasso has joined #ruby
<blahwoop>
irctc902: if you're just trying to get it just work. forget the parse.rb file. and just use Parse.create directly in your controller.
hashrocket has quit [Quit: Connection closed for inactivity]
tenderlo_ has quit [Read error: Connection reset by peer]
ldnunes has quit [Quit: Leaving]
<shevy>
you are right
<shevy>
it works fine in irb ...
tuelz1 has quit [Ping timeout: 265 seconds]
AnoHito has quit [Quit: Leaving]
chipotle has joined #ruby
<shevy>
works in irb but not in the .rb file...
<shevy>
readline.rb:126:in `encode!': "\xE8" followed by "c" on UTF-8 (Encoding::InvalidByteSequenceError)
dopieee has quit [Quit: Leaving]
<shevy>
ohhhh
kakusu has quit [Quit: leaving]
<shevy>
it works when I use .force_encoding
casadei_ has quit [Remote host closed the connection]
yardenbar has quit [Ping timeout: 240 seconds]
* adaedra
puts shevy in crèche
sometimes has joined #ruby
arup_r has quit [Quit: Leaving]
sometimes has quit [Client Quit]
<shevy>
adaedra strangely enough, I read that word in some english book... noted it down for not knowing what it is, then it went into my english dictionary
hashrocket has joined #ruby
user1138_ has joined #ruby
<shevy>
it was the only entry out of ~almost 1000 or so that caused problems :D
user1138 has quit [Ping timeout: 255 seconds]
_blizzy_ has joined #ruby
nateberkopec has quit [Quit: Leaving...]
<adaedra>
in English, it's Kindergarten
apfeluser has quit [Quit: Leaving]
_seanc_ has quit [Quit: _seanc_]
<Ox0dea>
adaedra: That's German.
<adaedra>
It's in my English dictionary D:
<yorickpeterse>
I think in English it's just called "hell"
<miah>
its a french word
<miah>
but
<miah>
1.
<miah>
North American
<miah>
a model or tableau representing the scene of Jesus Christ's birth, displayed in homes or public places at Christmas.
olistik has joined #ruby
user1138 has joined #ruby
<miah>
probably a topic better for #ruby-offtopic though =)
<yorickpeterse>
haha
omegamike has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 244 seconds]
user1138_ has quit [Ping timeout: 256 seconds]
texasmade has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
rubynuby has joined #ruby
blackmesa has joined #ruby
avocadorivalry has quit [Quit: avocadorivalry]
ledestin has quit [Ping timeout: 252 seconds]
j4cknewt has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby
decaff has joined #ruby
user1138_ has joined #ruby
olistik has quit [Ping timeout: 240 seconds]
AnoHito has joined #ruby
<adaedra>
miah: It also means that. Note that, in both, you take care of child(ren).
eminencehc has quit [Remote host closed the connection]
cajone has joined #ruby
riscky has quit [Ping timeout: 250 seconds]
mistym has joined #ruby
user1138_ has joined #ruby
<shevy>
beer?
Mendenhall has joined #ruby
curses has quit [Ping timeout: 260 seconds]
<dudedudeman>
beers for EVERYONE
user1138 has quit [Ping timeout: 255 seconds]
<dudedudeman>
or whatever you want to drink
hahuang61 has quit [Ping timeout: 246 seconds]
<dudedudeman>
or eat
DoubleMalt has quit [Remote host closed the connection]
pdoherty has quit [Ping timeout: 246 seconds]
<adaedra>
user1138__ has joined #ruby
<rakm>
dudedudeman nnoice
<rakm>
grats
<Papierkorb>
Is there a way to access class methods from within an instance method without having to writing TheClass. or self.class. ?
neoseeker has joined #ruby
bodgix1 has quit [Quit: Leaving.]
Igorshp has joined #ruby
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hinbody has joined #ruby
charliesome has joined #ruby
user1138 has joined #ruby
user1138_ has quit [Ping timeout: 264 seconds]
lwu_ has quit [Ping timeout: 255 seconds]
victortyau has quit [Ping timeout: 260 seconds]
mrmargolis has quit [Remote host closed the connection]
ofdtrinity has left #ruby ["Leaving"]
<Ox0dea>
Papierkorb: What're your oppositions to `self.class`?
Gues_____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030_ has quit [Ping timeout: 246 seconds]
ips|malc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
user1138__ has quit [Ping timeout: 264 seconds]
neoseeker has quit [Ping timeout: 272 seconds]
kies^ has quit [Ping timeout: 240 seconds]
mistym has quit [Ping timeout: 244 seconds]
michael_mbp has quit [Excess Flood]
<Papierkorb>
Ox0dea: it's just so verbose
michael_mbp has joined #ruby
decaff has quit [Read error: Connection reset by peer]
<ivanskie>
hi
user1138_ has joined #ruby
neoseeker has joined #ruby
decaff has joined #ruby
jgt has quit [Ping timeout: 264 seconds]
<ivanskie>
so my css has a few columns which are essentially boolean but represented in strings Yes/No... what would be an easy way to convert that to boolean?
<ivanskie>
csv*
theery has quit [Remote host closed the connection]
<adaedra>
col == "Yes"
<ivanskie>
i'm trying to import it into rails.. just realized that when i seeded the db it completely ignored these columns...
Igorshp has quit [Remote host closed the connection]
<Ox0dea>
It's just one of those things, I guess. `and` is different from `&&`, and they serve disparate purposes.
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<hal_9000>
what is weirich’s rule btw?
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
dimasg has quit [Ping timeout: 265 seconds]
s00pcan has joined #ruby
<craysiii>
if you look at the error though, it even says "excepting 'do' or '{'
<Ox0dea>
hal_9000: {} for "functional" blocks, wherein you're interested in the return value, and do/end for procedural ones, where you're after the side effects.
gcfhvjbkn has joined #ruby
<Ox0dea>
craysiii: Does enclosing the argument in parentheses make the sadness go away?
gcfhvjbkn has quit [Client Quit]
<hal_9000>
ah yes
<shevy>
anyone of you using colours on the commandline? what colours would you tend to use most often; I assume red is usually for warning-message output
gcfhvjbkn has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
gcfhvjbkn has quit [Client Quit]
christiandsg has quit [Ping timeout: 265 seconds]
<craysiii>
no the sadness remains.
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
bonhoeffer has joined #ruby
gcfhvjbkn has quit [Client Quit]
djbkd has joined #ruby
<Ox0dea>
shevy: I'd advise not issuing the whole message in color.
<bonhoeffer>
well, delete returns the deleted value
<bonhoeffer>
is there an option?
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<bonhoeffer>
ah …. reject
<bonhoeffer>
or -
<Ox0dea>
Your example wasn't particularly illustrative of the behavior you're interested in.
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
ixti has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<jhass>
shevy: red is actually for errors, warnings tend to be yellow
<bonhoeffer>
my bad — yep — [1,2,3].reject{|a| a == 2}
Kalov has joined #ruby
<shevy>
Ox0dea even bundle install uses colours!
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<shevy>
jhass hmm
nofxx has quit [Ping timeout: 252 seconds]
jtdoncas has joined #ruby
<Ox0dea>
shevy: Sure, but note that it uses color subtly in most cases.
<shevy>
yellow...
gcfhvjbkn has joined #ruby
nofxx has joined #ruby
gcfhvjbkn has quit [Client Quit]
<Ox0dea>
"Tag" your messages and color the tag.
irctc318 has joined #ruby
<jtdoncas>
Hey guys! How do I add a dependency to my private gem that depends on another private gem (on github)? Is the only way a private gem server?
<shevy>
Wag the dog and colour the tail?
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<jhass>
jtdoncas: pretty much, or you just add it and let bundler resolve it, requires to list both as git sources explicitly though
<jhass>
also
<jhass>
?guys jtdoncas
<ruboto>
jtdoncas, You probably don't mean to exclude, but not everyone relates to being "one of the guys". Maybe consider using "folks", "y'all" or "everyone" instead?
<shevy>
could he not add a new source to gem itself?
<jhass>
no
gcfhvjbkn has joined #ruby
<jhass>
sources are user configuration
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
mercwithamouth has quit [Quit: Lost terminal]
gcfhvjbkn has quit [Client Quit]
<jtdoncas>
jhass: what do you mean to just add it?
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Remote host closed the connection]
<jtdoncas>
in the gemspec?
<jhass>
yes
mistym has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<jtdoncas>
and how do I list as it as a git source?
<irctc318>
hello i added a gem so i can access Parse.com data on Rails, and i created a file "parse.rb" containing https://gist.github.com/anonymous/2c4d44679d62379b2f0e and im getting back this in terminal when i do rails s "syntax error, unexpected keyword_end"
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<jtdoncas>
irctc318: maybe that extra comma?
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<craysiii>
really bothering me that I can't use { } grrrr.
<irctc318>
let me try
chipotle has quit [Quit: cheerio]
user1138 has joined #ruby
<irctc318>
im getting this now "uninitialized constant MyApp (NameError)"
<craysiii>
i dont feel like going through all my code though in this one and changing it
<Ox0dea>
craysiii: That's what I meant about adding parentheses around the argument.
tvw has quit [Remote host closed the connection]
<craysiii>
i didn't realize the exception was the argument. noob :(
<craysiii>
thanks everyone
Igorshp has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Inside has joined #ruby
Inside has joined #ruby
<Ox0dea>
GarethAdams: When I'm at my most functional, I have a tendency to chain #map and #select and #reduce, and `end.` bothers me. Weirich's rule > line rule.
zenguy_pc has quit [Read error: Connection reset by peer]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
zenguy_pc has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
devoldmx has quit [Remote host closed the connection]
<jtdoncas>
irctc318: Replace MyApp with whatever module is defined in config/application.rb
zenguy_pc has quit [Read error: Connection reset by peer]
TeresaP has joined #ruby
devoldmx has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
zenguy_pc has joined #ruby
blackmes1 has quit [Ping timeout: 264 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
Thomas-0725 has quit [Max SendQ exceeded]
MatthewsFace has joined #ruby
gcfhvjbkn has joined #ruby
<jtdoncas>
so am I fucked in that I can't require a private gem on github as a gem's dependency?
hahuang61 has joined #ruby
gcfhvjbkn has quit [Client Quit]
grios has joined #ruby
Zai00 has quit [Quit: Zai00]
Phrogz has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<jhass>
jtdoncas: you do use bundler or not?
<TeresaP>
I'm saving some JSON data I've got in a JSON object to a file with File.write but it's adding => where we have :. Is there a setting to change that or do I have to reprocess the file to sub => for :?
Thomas-0725 has joined #ruby
djbkd has quit [Remote host closed the connection]
<jtdoncas>
jhass: yes
Igorshp has quit [Ping timeout: 240 seconds]
gcfhvjbkn has joined #ruby
<jhass>
jtdoncas: and you have one of your gems as git source in your Gemfile, right?
<irctc318>
yeah sounds like it was that, but now i get this "undefined method `create' for Parse:Module (NoMethodError)"
gcfhvjbkn has quit [Client Quit]
bronson has joined #ruby
<jtdoncas>
no. You're saying I should add the git gem to my other gem's gemfile?
gcfhvjbkn has joined #ruby
<Phrogz>
I want to create a headless service application that communicates through HTTP. I need to be able to configure how it starts up, e.g. to use an in-memory sqlite database during testing.
gcfhvjbkn has quit [Client Quit]
Zai00 has joined #ruby
<jhass>
jtdoncas: no
<jhass>
jtdoncas: how do you use your gem in your project?
<Phrogz>
I was going to use Sinatra + Thin, but I can't figure out how to pass command-line params for configuring the run from thin along.
user1138_ has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<jtdoncas>
jhass: in my application's I point it to github
<Phrogz>
Should I not use Thin? Just use Webrick?
gcfhvjbkn has joined #ruby
<jhass>
jtdoncas: gem "foo", github: "bar/foo" is what I'd call a git source
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has joined #ruby
<jtdoncas>
jhass: yes I have that in my applications
paulcsmith has joined #ruby
user1138 has quit [Ping timeout: 246 seconds]
<Ox0dea>
?jsonobject TeresaP
<ruboto>
TeresaP, there is no such thing as a JSON object. You either have a String containing serialized JSON, or you have ruby objects (usually Hashes/Arrays/Strings). Which is it?
<jhass>
(see how it helps to not be vague but specific?)
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
juanpablo_ has quit [Quit: (null)]
gcfhvjbkn has joined #ruby
<jhass>
jtdoncas: say your other gem is called bar, you add add_dependency "bar" to foo's .gemspec, and gem "bar", github: "bar/bar" to your _projects_ Gemfile
<TeresaP>
I parsed the JSON with JSON.parse, then grabbed one of the Hash items and saved that.
gcfhvjbkn has quit [Client Quit]
juanpablo_ has joined #ruby
Thomas-0725 has quit [Max SendQ exceeded]
<Ox0dea>
TeresaP: You'll want Hash#to_json, then.
<jtdoncas>
irctc318: That means you don't have a create method in your Parse gem. You should define the create method using def self.create
ledestin has joined #ruby
<TeresaP>
Thanks Ox0dea, I guess that should've been obvious
hahuang61 has quit [Ping timeout: 240 seconds]
<Ox0dea>
Happy to help.
<jtdoncas>
jhass: so my projects need to have knowledge of my gems dependencies?
sdwrage has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Remote host closed the connection]
<irctc318>
shouldnt it come with the gem?
zenguy_pc has quit [Read error: Connection reset by peer]
mrmargolis has joined #ruby
bronson has quit [Ping timeout: 244 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<Ox0dea>
TeresaP: There's also JSON.unparse for when you need generalized conversion and/or your fancy tickled.
zenguy_pc has joined #ruby
<TeresaP>
oh nice
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<Phrogz>
Maybe I should turn my request on its head: if YOU were going to write a little headless Ruby app that communicates to other apps over the network:
<Phrogz>
a) Would you use HTTP, or sockets?
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<Phrogz>
b) What libraries would you use?
<jtdoncas>
irctc318: yeah it should, sorry I thought it was your own gem.
Kyuujitsu has quit [Ping timeout: 250 seconds]
gcfhvjbkn has joined #ruby
omegamike has joined #ruby
gcfhvjbkn has quit [Client Quit]
<jhass>
jtdoncas: if you don't have a gem source that provides them, yes. Rubygems can't build things from git repos, that's bundler's doing
gcfhvjbkn has joined #ruby
<jtdoncas>
jhass: ah okay. thank you
<jhass>
the other alternative is to fetch and gem build them by hand
htmldrum has joined #ruby
gcfhvjbkn has quit [Client Quit]
Kyuujitsu has joined #ruby
havenwood has quit [Ping timeout: 246 seconds]
<jhass>
but that won't integrate well into --path, bundle package and such
<irctc318>
yeah so idk why its not reading client?
juanpablo_ has quit [Ping timeout: 250 seconds]
fenjamin has quit [Ping timeout: 255 seconds]
IrishGringo has quit [Ping timeout: 272 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
blue_deref has quit [Quit: bbn]
dimasg has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
hahuang61 has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
djbkd has joined #ruby
<jtdoncas>
irctc318: did you define parse somewhere else? That's weird..
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
blackmes1 has joined #ruby
<irctc318>
i didnt define it anywhere else
iceyec has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
omegamike has quit [Ping timeout: 252 seconds]
mrmargolis has quit [Remote host closed the connection]
Mendenhall has quit [Ping timeout: 246 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
bootstrappm has quit [Ping timeout: 244 seconds]
<TeresaP>
God JSON.pretty_generate is beautiful
Kyuujitsu has quit [Ping timeout: 264 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
RegulationD has quit [Remote host closed the connection]
bootstrappm has joined #ruby
iceyec has quit [Client Quit]
tejasmanohar_ has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<jhass>
TeresaP: also there as to_pretty_json iirc
Kyuujitsu has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<TeresaP>
ooh
<jhass>
mmh, no that's Crystal :D
<jhass>
sorr
<jhass>
sorry
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<TeresaP>
Ha, that's ok
_seanc_ has joined #ruby
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
_blizzy_ has quit [Ping timeout: 265 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
<Ox0dea>
There *is* JSON.pretty_unparse, though, which is... there.
devoldmx has quit [Ping timeout: 246 seconds]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
gcfhvjbkn has joined #ruby
gcfhvjbkn has quit [Client Quit]
tejasmanohar_ has quit [Ping timeout: 240 seconds]