<eam>
what's the cleanest way to write: a = []; a.push a
blackmesa has quit [Ping timeout: 250 seconds]
<apeiros>
I have nothing to offer beyond `a = []; a << a`
ibouvousaime has quit [Ping timeout: 255 seconds]
<Radar>
eam: Ox0dea probably has a solution involving $
livcd has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
<eam>
I have a deep seated dislike for using the bitshift operator in an overloaded fashion
<apeiros>
Radar: eam asked for cleaner
<eam>
I'll take $ solutions too
<eam>
always welcome
<eam>
does ruby maintain the $[ equiv?
<eam>
(change arrays from being zero-indexed to $[ indexed)
<wolffles>
thanks peeps
<wolffles>
last question. when your reading “Integer#times” Returns the reciever …what does the # stand for?
<Radar>
instance method
<wolffles>
i see
<apeiros>
:: would be used for class method
janebootydoe2 has quit [Quit: Leaving]
cschneid_ has quit [Remote host closed the connection]
crdpink has joined #ruby
crdpink has left #ruby [#ruby]
firstdayonthejob has quit [Ping timeout: 256 seconds]
pawnbox has joined #ruby
IlluminatiConfir has joined #ruby
<Radar>
Or Class.method
<IlluminatiConfir>
How can I call a method inside a method
<IlluminatiConfir>
?
<Radar>
IlluminatiConfir: What have you tried?
<IlluminatiConfir>
def method name
<IlluminatiConfir>
action
<IlluminatiConfir>
other method()
<IlluminatiConfir>
end
mdw has quit [Quit: Sleeping Zzzzz]
IlluminatiConfir is now known as IlluminatiConf
IlluminatiConf is now known as Illuminati
Illuminati is now known as LordOfAllLords
<LordOfAllLords>
Anyone?
pawnbox has quit [Ping timeout: 260 seconds]
CloCkWeRX has joined #ruby
<Ebok>
Uh
<Radar>
other method()? what
<Ebok>
You call methods inside methods all the time...
<Radar>
LordOfAllLords: no fake code please
<LordOfAllLords>
I am new to Ruby (and programming) I want to run another method
<Ebok>
Be more specific
<Ebok>
Give an example in English at the bear minimum
<Ebok>
bare
<shevy>
the bear minimum! down with the bears!
<Ebok>
lol
<LordOfAllLords>
I defined a method that askes for an action, than a method for said action asks for some information, stores it in a variable, and then I ant to go back to first method
ziyadb has quit [Quit: Connection closed for inactivity]
Nahra``` has quit [Read error: Connection reset by peer]
haraigo has joined #ruby
Nahra``` has joined #ruby
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
dfockler has joined #ruby
<m1dnight_>
Hmm, seems like the bin files are not being copied to /usr/local/bin
blackgoat has quit [Quit: WeeChat 1.3]
<Ox0dea>
m1dnight_: Do you want to have multiple versions of Ruby installed?
NoTroutAboutIt has joined #ruby
Lucky__ has joined #ruby
<m1dnight_>
Well, I just don't want to break stuff. That is all.
<m1dnight_>
I just did `ruby-install --latest`, we'll see what happens.. I guess :p
<m1dnight_>
I can always go back I think by chaning the symlink
<m1dnight_>
(I think)
ellistaa has quit [Quit: ellistaa]
blackgoat has joined #ruby
mistermo_ has joined #ruby
agent_white has quit [Quit: brbfarmstuff]
blackgoat has quit [Client Quit]
<m1dnight_>
Right, gitlab was the one that was acting up with some ruby versions. Let's see how it goes..
baweaver has quit [Remote host closed the connection]
chipotle has quit [Quit: cheerio]
kalopsian has joined #ruby
<shevy>
the cautious on tippy toes :D
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iateadonut has joined #ruby
mistermo_ has quit [Ping timeout: 256 seconds]
colegatron has joined #ruby
mary5030 has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
LordOfAllLords has joined #ruby
RegulationD has joined #ruby
weemsledeux has joined #ruby
pwnd_nsfw has quit [Ping timeout: 260 seconds]
karapetyan has quit [Ping timeout: 260 seconds]
zotherstupidguy has quit [Ping timeout: 246 seconds]
kfpratt has quit [Remote host closed the connection]
whippythellama has quit [Quit: WeeChat 1.3]
chouhoulis has quit [Remote host closed the connection]
blackgoat has joined #ruby
chouhoulis has joined #ruby
RegulationD has quit [Ping timeout: 276 seconds]
chouhoulis has quit [Remote host closed the connection]
<m1dnight_>
I got it working!
DonOtreply has quit [Quit: DonOtreply]
<m1dnight_>
I didnt have to use the ruby-install though. I had it installed and all, but it turned out I just had to point /usr/bin/gem to /usr/bin/gem2.0
<m1dnight_>
not sure if I broke something important now..
<Radar>
That CSV was generated with CSV.generate, so I'm assuming CSV.parse has something to do that.
aibot has quit [Ping timeout: 240 seconds]
<Radar>
Actually, it's generated by another library. Please ignore me :)
Lucky__ has joined #ruby
mloy has quit [Quit: Leaving]
Lucky__ has quit [Client Quit]
ruby-lang427 has joined #ruby
scottschecter has joined #ruby
pwnd_nsfw has joined #ruby
ruby-lang427 has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
<cmolenda>
Just in case it helps with whatever you end up doing, a very easy way to ignore the first element of an array (the first line of a file, if pulled in via CSV or readlines) is using a range of 1..-1. E.g. filearray[1..-1]
<cmolenda>
(Radar)
<Radar>
cmolenda: Yeah, that's effectively what this library is doing
<Radar>
it's the excel_csv gem. I was generating it with that gem, but trying to read it with the stdlib CSV
<Ox0dea>
How do you suppose "skipping" would work there?
mjbjr has joined #ruby
nettoweb has joined #ruby
crystalmaiden has joined #ruby
stryek has joined #ruby
<apeiros>
e.drop(2).each would call .next twice before yielding
<Ox0dea>
Exactly.
<Ox0dea>
That's not "skipping".
<apeiros>
that's text-book definition of skipping
nettoweb has quit [Max SendQ exceeded]
CloCkWeRX has left #ruby [#ruby]
<apeiros>
even if you go all pedantic
<Ox0dea>
apeiros: Consider an Enumerator that writes to a file in #next, for whatever reason.
<apeiros>
that'd have weird effects with pretty many enumerator functions
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
Which ones come to mind?
<apeiros>
as side effects in general would
<apeiros>
try peek
<apeiros>
and relatives
<apeiros>
try rewind
<Ox0dea>
But that Enumerators *can* have side effects is why Enumerator#drop can't Do the Right Thing in the general case.
<apeiros>
if you arbitrarily define "the right thing", sure.
babblebre has quit [Quit: Connection closed for inactivity]
<apeiros>
skipping is easily good enough.
pwnd_nsfw has quit [Ping timeout: 250 seconds]
mary5030 has joined #ruby
<apeiros>
and if you have side effects in such an enumerator and fail to read the docs - well, cry me a river.
bkxd has joined #ruby
nettoweb has joined #ruby
<Ox0dea>
"Skip" and "ignore" don't strike me as even remotely synonymous, but okay.
<apeiros>
that'd be because they aren't.
<Ox0dea>
But you're using them synonymously?
<apeiros>
ignoring has no relation to order.
ruid has quit [Quit: Leaving]
nettoweb has quit [Max SendQ exceeded]
CloCkWeRX has joined #ruby
CloCkWeRX has left #ruby [#ruby]
mistermocha has quit [Remote host closed the connection]
<mjbjr>
just did a fresh gentoo install of ruby... for gems, is the current best pactice to use 'gem install some_gem' or to use 'emerge some_gem' directly?
<Ox0dea>
To "skip" the enumeration would (rather obviously) be to not do it; you're suggesting that Enumerator#drop could perform the enumeration and ignore its result/effects.
shinnya has quit [Ping timeout: 255 seconds]
gregf has quit [Quit: WeeChat 1.3]
<Ox0dea>
mjbjr: Does Portage repackage every single gem?
shadoi has quit [Quit: Leaving.]
guacamol_ has joined #ruby
guacamol_ has quit [Client Quit]
guacamol_ has joined #ruby
<apeiros>
mjbjr: depends. as Ox0dea insinuates, you might not have the newest or all packages. otoh using gem will mean that you use two package managers. in most cases, using gem is probably less painful.
bkxd has quit [Ping timeout: 255 seconds]
guacamole has quit [Ping timeout: 246 seconds]
MattV has joined #ruby
<apeiros>
Ox0dea: I find your notion of skipping broken. ary.each.drop(2) does in no way imply that the .each would *not* go over all elements. all it implies is that *after* the drop(2), you get 2 less from the *result*
<apeiros>
so IMO your whole argument holds no water.
<mjbjr>
apeiros: roger that, is there a 'gem cmd some_gem' where it will give me details about the gem without installing it? In the past the 'pg' gem had fallen behind the code in an 'emerge pg'.
<apeiros>
it should neither be the aim, nor be expected to suppress iteration before the dropping.
pawnbox has joined #ruby
astrobu__ has joined #ruby
<apeiros>
mjbjr: gem help commands
astrobu__ has quit [Remote host closed the connection]
<mjbjr>
thanks
<apeiros>
I rarely use anything besides gem install, sorry.
kfpratt has joined #ruby
guacamole has joined #ruby
<Ox0dea>
apeiros: Iteration and enumeration are subtly different things.
<mjbjr>
apeiros: ok, good to know
<Ox0dea>
A simple array can be indexed into; that just isn't true for an enumerator.
<apeiros>
I think gem search -d does. but gem search does a wildcard search. if you want for the precise name, use '^name$'
<apeiros>
Ox0dea: does not change a single thing about what I said.
<apeiros>
the expression before can be a filter, a generator or an iterator. it does not matter.
gregf has joined #ruby
<Ox0dea>
It'd just be weird for a "subtractive" operation like #drop to be stateful.
<apeiros>
the expression before is not expected to not go through all values it enumerates.
wolffles has quit [Quit: wolffles]
<Ox0dea>
Huh?
<apeiros>
Ox0dea: it's just as stateful as each_cons or each_slice.
<apeiros>
not weird at all.
<apeiros>
or .first(n) or .last(n)
guacamol_ has quit [Ping timeout: 245 seconds]
<apeiros>
.last(n) being a nice example of your way of thinking to utterly fail.
dlitvak has quit [Remote host closed the connection]
<apeiros>
because that too will just iterate through all values, retaining n values. so if you expect that to not invoke the expression before it for all values for the first length-n items…
<apeiros>
Ox0dea: you can't have your cake and eat it too
<shevy>
:)
icarus has quit [Ping timeout: 265 seconds]
<apeiros>
on one hand you try to argue with purity, on the other hand you drop it the second it bites your argument
aibot has joined #ruby
icarus has joined #ruby
<Ox0dea>
apeiros: I wasn't arguing for parity, but rather against *unintended* side effects.
BTRE has quit [Remote host closed the connection]
<apeiros>
I maintain: drop(n) does not have to change what the enumerator it is chained to does. it's effect is for the chain which follows. if you build an enumerator which has side-effects and need a construct to not execute the side-effects of the first N enumerations, drop(N) would be the wrong tool.
blackgoat has quit [Ping timeout: 265 seconds]
kies^ has quit [Ping timeout: 276 seconds]
<LordOfAllLords>
What should I be researching if I want to store information using Ruby. I want to store a database with titles and contents. SQL?
gatman_ has quit []
<Ox0dea>
apeiros: Should there be Enumerator#skip?
<apeiros>
Enumerable#skip. I see no reason to use a new name.
<apeiros>
i.e. #drop returning an enumerator would suffice.
<apeiros>
Ox0dea: another question: Should the current Enumerator#drop not execute the first N enumerations?
kfpratt has quit [Remote host closed the connection]
krz has joined #ruby
<apeiros>
your argument implies that the current implementation of #drop is already broken.
<Ox0dea>
apeiros: Could you show me your Enumerator#last patch?
<Ox0dea>
Is it just `to_a[-1]`?
<apeiros>
either nobody decided it should go in, or somebody expressly decided it was too much, or - but that I doubt - somebody decided it did not belong.
<apeiros>
Ox0dea: mostly. it checks for .reverse_each to optimize.
frem has quit [Quit: Connection closed for inactivity]
freerobby has quit [Quit: Leaving.]
<apeiros>
great. seems I don't have that on my imac and my laptop is in the sleeping room. can't show you the code now. but the patch is indeed just a respond_to?(:reverse_each) -> reverse_each.first(n).reverse, else -> .each, accumulate n, shift/push until end
yfeldblum has quit [Remote host closed the connection]
<Ox0dea>
Nifty.
pietr0 has quit [Quit: pietr0]
pawnbox has joined #ruby
<apeiros>
oh, right, special case for no-arg
<apeiros>
since that returns single element. there with .reverse_each it's .reverse_each do |x| return x end
<apeiros>
and without reverse_each it's obviously just rv=nil; each do |x| rv = x; end
<apeiros>
so your infinite enumerator wouldn't run out of memory from the to_a, it's just not halt
<Radar>
it shouldn't be matching the title from the second code block
icarus has quit [Read error: Connection reset by peer]
<apeiros>
Radar: but your regex specifies "match {…} block, then match all lines which start with whitespace, then match first line which does not start with whitespace"
weemsledeux has joined #ruby
<apeiros>
and the first line without whitespace is the second {…} block
icarus has joined #ruby
<Radar>
apeiros: yeah
<apeiros>
so I'm not quite sure what it is supposed to match
<Radar>
I think I can get away with /^({[^}]*})$(\s{4}.*)/m
<Radar>
apeiros: It should match the {title ... } and then the indented code block underneath it, and then stop
lacuna has quit [Remote host closed the connection]
<Ox0dea>
Darmani: What do I do with this?
<Darmani>
Well it's music.
<Porfa>
puts “yo” * 99
ta has joined #ruby
<Darmani>
People typically listen to music.
<Ox0dea>
Darmani: I prefer to feel it.
<Ox0dea>
Will I feel this one?
<Darmani>
Ox0dea: Lol that's up to you xD
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
> learn from the ones we hate the most
<Ox0dea>
Should I make something of that?
<Darmani>
Ox0dea: You could.
<Ox0dea>
I might.
<Darmani>
You said you wanted to feel =P
<Ox0dea>
I'm feeling it now, Mr. Darmani.
penne12 has joined #ruby
<Darmani>
Ox0dea: Mission Accomplished
freerobby has joined #ruby
jbrhbr has quit [Ping timeout: 255 seconds]
<penne12>
hello
<blub>
hi penne12
* Darmani
waves to penne12
<penne12>
I feel popular
<Darmani>
Or the people here are genuinely welcoming.
<Darmani>
Which has nothing to do with you.
<penne12>
D:
<penne12>
Thanks, btw
<Darmani>
<33
psy_ has quit [Read error: No route to host]
<Ox0dea>
> Hello, babies. Welcome to Earth. It's hot in the summer and cold in the winter. It's round and wet and crowded. At the outside, babies, you've got about a hundred years here. There's only one rule that I know of, babies — "God damn it, you've got to be kind."
ta has quit [Ping timeout: 264 seconds]
<Darmani>
Ox0dea: Is that a song?
<Ox0dea>
Vonnegut.
* Darmani
is 22 years old
* Darmani
thinks that was before his time
hxegon has quit [Quit: BRB]
<Nilium>
You should read Vonnegut.
<Darmani>
Oh that's an author?
psy_ has joined #ruby
<Nilium>
Kurt Vonnegut, yes.
<Ox0dea>
Darmani: They don't make you kids read Slaughterhouse-Five anymore?
<Darmani>
With a title like that I can't imagine why xP
<Nilium>
Every time I re-read that I'm amazed by how much of it I've forgotten
<Ox0dea>
I read it in a sitting...
d0nn1e has quit [Ping timeout: 250 seconds]
haraigo has quit [Ping timeout: 256 seconds]
<Darmani>
How does one change their nickname?
<Ox0dea>
/nick ohai
<Darmani>
o.o
Bloomer has quit []
Darmani is now known as Majora
voodo has quit [Quit: Leaving...]
<Majora>
nuuu
<Majora>
Wait
<Majora>
Oh it worked.
<Nilium>
I wonder how long it'd take to do Gravity's Rainbow in a sitting and how many pillows I'd need to sit on
<Majora>
Cool.
<Ox0dea>
Nilium: You're crazy.
<Ox0dea>
Pynchon is crazy.
<Nilium>
Yeah.
<Majora>
These are books I've never heard of....
<Majora>
They must be old.
<Nilium>
Pynchon's pretty famous.
ellistaa has quit [Quit: ellistaa]
<blub>
you don't sound very literate
d0nn1e has joined #ruby
<Nilium>
That doesn't seem like a nice thing to say.
niotoan has quit [Read error: Connection reset by peer]
AndChat|20400 has joined #ruby
molay has joined #ruby
kfpratt has joined #ruby
<molay>
I'm stumped, I get this warning when I try to install gems "WARNING: You don't have /home/molay/.gem/ruby/2.3.0/bin in your PATH, gem executables will not run."
pawnbox has joined #ruby
<molay>
help me #ruby, you're my only hope
<penne12>
type `echo $PATH`
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mjuszczak>
I'm trying to figure out if the file ".gitignore" contains a file, via Ruby. What's the best way to do this? Is there a simple way to parse the .gitignore file using ruby?
<molay>
do you think I might be better off removing ruby and rvm completely and then reinstalling from a repo?
phredus has joined #ruby
<penne12>
mjuszczak, can you use bash?
<mjuszczak>
penne12: no reason why I can't shell out. Execute git check-ignore?
<penne12>
You can pipe a file in "cat .gitignore | ruby yourfile.rb"
<penne12>
I don't know if that's a good idea, though
gix has joined #ruby
<penne12>
open the .gitignore file, it's seperated by newlines
al2o3-cr has joined #ruby
<penne12>
you can use the file class
PsionTheory has quit [Remote host closed the connection]
arup_r has joined #ruby
<mjuszczak>
that'll work! Just wanted to make sure there wasn't something simple I was missing.
<Ox0dea>
mjuszczak, penne12: .gitignore directives can contain special characters that you'd want to treat, well, specially.
skcin7_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mjuszczak>
understood
<mjuszczak>
thank you!
<Ox0dea>
There's the Shellwords standard library, but alas, no `Shellwords.shellexpand` method. :<
<mjuszczak>
hrmph
<mjuszczak>
I'll just shell out to git check-ignore
<Ox0dea>
Seems perfectly reasonable.
<Ox0dea>
"Reinvent only that you would improve the wheel."
terminalrecluse has joined #ruby
terminalrecluse has quit [Client Quit]
aadam21 has quit [Remote host closed the connection]
shakes has quit [Quit: Leaving]
aadam21 has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
terminal_ has quit [Ping timeout: 255 seconds]
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duncannz has joined #ruby
krz has joined #ruby
rkazak has joined #ruby
aadam21 has quit [Ping timeout: 272 seconds]
veg has quit []
astrobun_ has joined #ruby
agent_white has joined #ruby
bkxd has joined #ruby
zast has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
scripore has joined #ruby
joonty has joined #ruby
niftylettuce has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
cmolenda has quit [Remote host closed the connection]
akkad has quit [Excess Flood]
ceej has quit [Ping timeout: 264 seconds]
<molay>
Ox0dea: you made a remark about RVM earlier... would you advise against using it?
bb010g has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
ellistaa has joined #ruby
<Ox0dea>
molay: I can only offer an outsider's perspective, but it seems to do more harm than good.
arescorpio has quit [Quit: Leaving.]
ellistaa has quit [Client Quit]
<Ox0dea>
It sticks its fingers in too many cookie jars, but I suppose some people might prefer that.
cmolenda has joined #ruby
<molay>
Ox0dea: oh ok.. so you're an outsider with regards to RVM or with regards to Ruby?
<Ox0dea>
molay: RVM. :P
akkad has joined #ruby
<molay>
Ox0dea: haha yeah figured. more curious what your answer was gonna be
joonty has quit [Ping timeout: 260 seconds]
rrichardsr3 has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
skcin7 has joined #ruby
<Ox0dea>
molay: I like simple things kept simple, and for that there's chruby.
mjuszczak has quit []
psy_ has quit [Remote host closed the connection]
mistermocha has joined #ruby
astrobun_ has quit [Remote host closed the connection]
<molay>
Ox0dea: me too.. I will check it out
penne12 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
molay has quit [Quit: Leaving]
mistermocha has quit [Ping timeout: 245 seconds]
hxegon has joined #ruby
scottschecter has quit [Ping timeout: 265 seconds]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
hxegon is now known as hxegon_AFK
hxegon_AFK is now known as hxegon
cmolenda has quit [Remote host closed the connection]
NoTroutAboutIt has quit [Ping timeout: 260 seconds]
<greenhat>
I used to manually compile rubies and manually update symlinks. Then I discovered RVM and it was great. Then bundler made most of RVM unnecessary for me and I switched to chruby and ruby-build and it is great.
<greenhat>
I hope one day native OS packages will get their act together and I won't need any ruby version managers at all, and it will be great.
mary5030 has quit [Remote host closed the connection]
<Ox0dea>
$ pacman -Si ruby | grep V
<Ox0dea>
Version : 2.3.0-1
<Ox0dea>
Just sayin'.
pawnbox has quit [Remote host closed the connection]
<greenhat>
Yeah. Gentoo does a fair job too. But arch and gentoo are fairly niche :)
<greenhat>
I do use the brightbox ppa in production.
<greenhat>
I guess I should re-phrase that to "when osx gets its act together".
Dimik has quit [Ping timeout: 240 seconds]
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
ellistaa has quit [Quit: ellistaa]
hxegon is now known as hxegon_AFK
makenoise has joined #ruby
hxegon_AFK is now known as hxegon
pawnbox has joined #ruby
Melpaws1 has joined #ruby
MattV has quit [Quit: Leaving.]
niotoan has joined #ruby
AndChat|20400 has quit [Read error: Connection reset by peer]
djbkd has quit [Remote host closed the connection]
cscheib has joined #ruby
astrobun_ has joined #ruby
kfpratt has joined #ruby
bestbrents has joined #ruby
ta has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
UtkarshRay has joined #ruby
BTRE has quit [Remote host closed the connection]
moei has quit [Quit: Leaving...]
hakunin has quit []
yes`r has quit [Ping timeout: 245 seconds]
ta has quit [Ping timeout: 260 seconds]
aadam21 has joined #ruby
arup_r has quit [Remote host closed the connection]
ceej has joined #ruby
darkf has joined #ruby
<havenwood>
greenhat: 2.3.0 on brew or macports already.
UtkarshRay has quit [Quit: Leaving]
<havenwood>
greenhat: Even fink too.
yardenbar has quit [Ping timeout: 240 seconds]
BTRE has joined #ruby
hxegon is now known as hxegon_AFK
<havenwood>
greenhat: OS X seems well covered.
Majora has quit [Ping timeout: 252 seconds]
arup_r has joined #ruby
poguez_ has joined #ruby
karapetyan has joined #ruby
djbkd has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
Respek has quit [Quit: gone to sleep. ZZZzzz…]
hxegon_AFK has quit [Quit: BRB]
karapetyan has quit [Ping timeout: 260 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
fly5566 has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
jobewan has joined #ruby
user083 has quit [Read error: Connection reset by peer]
drys has joined #ruby
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
LMity has joined #ruby
yfeldblum has joined #ruby
yes`r has joined #ruby
djbkd has quit [Remote host closed the connection]
hxegon has joined #ruby
astrobun_ has quit [Remote host closed the connection]
sigurding has joined #ruby
djbkd has joined #ruby
aadam21 has quit [Ping timeout: 250 seconds]
dlitvak has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
makenoise has quit []
Coldblackice has quit [Ping timeout: 260 seconds]
bkxd has joined #ruby
Palaver has joined #ruby
govg has quit [Ping timeout: 264 seconds]
icarus has quit [Read error: Connection reset by peer]
icarus has joined #ruby
dlitvak has quit [Ping timeout: 255 seconds]
govg has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
BTRE has quit [Quit: Leaving]
bkxd has quit [Ping timeout: 265 seconds]
astrobun_ has joined #ruby
Feyn has joined #ruby
Feyn has quit [Client Quit]
Feyn has joined #ruby
astrobun_ has quit [Read error: Connection reset by peer]
astrobun_ has joined #ruby
LMity has quit [Ping timeout: 265 seconds]
blackgoat has quit [Ping timeout: 246 seconds]
rkazak has joined #ruby
Feyn has quit [Client Quit]
darkf_ has joined #ruby
LMity has joined #ruby
fly5566 has quit [Remote host closed the connection]
darkf has quit [Disconnected by services]
darkf_ is now known as darkf
toretore has joined #ruby
Feyn has joined #ruby
astrobun_ has quit [Ping timeout: 240 seconds]
hxegon has quit [Quit: BRB]
mary5030 has joined #ruby
govg has quit [Ping timeout: 276 seconds]
govg has joined #ruby
mary5030 has quit [Ping timeout: 260 seconds]
astrobun_ has joined #ruby
dionysus69 has joined #ruby
paradisaeidae has quit [Ping timeout: 260 seconds]
astrobun_ has quit [Read error: Connection reset by peer]
astrobun_ has joined #ruby
paradisaeidae has joined #ruby
tubuliferous_ has quit [Ping timeout: 260 seconds]
govg has quit [Ping timeout: 264 seconds]
krzkrz has joined #ruby
krz has quit [Read error: Connection reset by peer]
drys has quit [Read error: Connection reset by peer]
tubuliferous_ has joined #ruby
soahccc has quit [Ping timeout: 240 seconds]
Palaver has quit [Quit: Palaver]
dionysus69 has quit [Quit: dionysus69]
aadam21_ has joined #ruby
tmtwd has quit [Ping timeout: 260 seconds]
lacuna has joined #ruby
colegatron has quit [Ping timeout: 260 seconds]
govg has joined #ruby
Ishido has joined #ruby
aganov has joined #ruby
viperman has joined #ruby
sigurding has quit [Quit: sigurding]
lacuna has quit [Remote host closed the connection]
djbkd has quit [Quit: My people need me...]
trautwein has joined #ruby
juddey has joined #ruby
icarus has quit [Read error: Connection reset by peer]
symm- has joined #ruby
icarus has joined #ruby
paradisaeidae has quit [Quit: ChatZilla 0.9.92 [Firefox 43.0.3/20151223140742]]
symm- has quit [Client Quit]
mary5030 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lacuna has joined #ruby
jam_ has joined #ruby
DonOtreply has joined #ruby
lacuna has quit [Read error: Connection reset by peer]
viperman has quit [Remote host closed the connection]
colegatron has joined #ruby
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
claw has quit [Ping timeout: 240 seconds]
mary5030 has quit [Remote host closed the connection]
charliesome has joined #ruby
pawnbox has quit [Remote host closed the connection]
<greenride>
Are there any Ruby frameworks that use a persistent connection to push data to a web browser from a server? Ideally, the framework would be compatible with a Postgres database.
RegulationD has joined #ruby
<Ox0dea>
greenride: Sounds like you want ActionCable.
yardenbar has joined #ruby
<greenride>
Ox0dea: Cool! I didn't realize this was merged into Rails.
n00bdev has joined #ruby
aadam21__ has joined #ruby
<greenride>
Has anyone done load tests on the maximum number of open connections this can support?
dlitvak has quit [Ping timeout: 256 seconds]
baweaver has quit [Remote host closed the connection]
<Ox0dea>
I suspect somebody has.
claw has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
framling has joined #ruby
sigurding has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
choke has joined #ruby
krzkrz has quit [Ping timeout: 272 seconds]
choke has quit [Read error: Connection reset by peer]
radgeRayden has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
aadam21_ has quit [Remote host closed the connection]
aadam21_ has joined #ruby
jas02 has joined #ruby
Ox0dea has quit [Ping timeout: 245 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SOLDIERz has joined #ruby
aadam21_ has quit [Remote host closed the connection]
aadam21 has joined #ruby
rkazak has joined #ruby
weemsledeux has joined #ruby
Asher has quit [Ping timeout: 246 seconds]
niftylettuce has quit [Quit: Connection closed for inactivity]
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
moei has joined #ruby
howdoi has joined #ruby
ByronJoh1son has quit [Remote host closed the connection]
hahuang61 has joined #ruby
ByronJoh1son has joined #ruby
ibouvousaime has joined #ruby
claw has quit [Read error: Connection reset by peer]
choke has joined #ruby
nofxx has quit [Ping timeout: 272 seconds]
kies has joined #ruby
peeja has joined #ruby
lxsameer has quit [Ping timeout: 245 seconds]
smactive has quit [Remote host closed the connection]
startupality has joined #ruby
ta has joined #ruby
lxsameer has joined #ruby
ascarter has joined #ruby
peeja has quit [Ping timeout: 260 seconds]
claw has joined #ruby
viperman has joined #ruby
pawnbox has quit [Remote host closed the connection]
rkazak has quit [Quit: Sleep.....ing....]
pawnbox has joined #ruby
aadam21 has quit [Remote host closed the connection]
govg has quit [Ping timeout: 276 seconds]
ta has quit [Ping timeout: 255 seconds]
domgetter has joined #ruby
aadam21__ has quit [Ping timeout: 256 seconds]
dextertzu has quit [Read error: Connection reset by peer]
symm- has joined #ruby
krzkrz has joined #ruby
bkxd has joined #ruby
bMalum has joined #ruby
rkazak has joined #ruby
govg has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
Asher has joined #ruby
Dimik has joined #ruby
pdoherty has quit [Ping timeout: 255 seconds]
mdw has joined #ruby
firstdayonthejob has joined #ruby
bubbys has joined #ruby
mdw has quit [Client Quit]
choke has quit [Read error: Connection reset by peer]
ibouvousaime has quit [Ping timeout: 265 seconds]
rippa has joined #ruby
blub` has joined #ruby
skade has joined #ruby
dlitvak has joined #ruby
mdw has joined #ruby
n00bdev has quit []
blub has quit [Ping timeout: 260 seconds]
gagrio has joined #ruby
dlitvak has quit [Ping timeout: 250 seconds]
kies has quit [Ping timeout: 264 seconds]
sandstrom has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
juddey has quit [Ping timeout: 256 seconds]
jobewan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roshanavand has joined #ruby
LMity has joined #ruby
ur5us has joined #ruby
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
aufi has joined #ruby
niotoan has quit [Ping timeout: 240 seconds]
allenn has joined #ruby
allenn has joined #ruby
roshanavand has quit [Remote host closed the connection]
juddey has joined #ruby
mary5030 has joined #ruby
allenn has quit [Remote host closed the connection]
lxsameer has quit [Read error: Connection timed out]
codecop has joined #ruby
lxsameer has joined #ruby
rns has quit [Ping timeout: 264 seconds]
roshanavand has joined #ruby
ta has joined #ruby
Puffball_ has quit [Read error: Connection reset by peer]
Puffball has joined #ruby
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
pawnbox has quit [Remote host closed the connection]
Coral has joined #ruby
mary5030 has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
Luke-Du has joined #ruby
juddey has quit [Ping timeout: 260 seconds]
nunchuck has quit [Ping timeout: 255 seconds]
arup_r has quit []
saneax_AFK is now known as saneax
gigetoo has quit [Ping timeout: 276 seconds]
saneax is now known as Guest98346
sandstrom has quit [Quit: My computer has gone to sleep.]
kies has joined #ruby
roshanavand has quit [Ping timeout: 265 seconds]
gigetoo has joined #ruby
dn` has joined #ruby
justinmcp_ has quit [Read error: Connection reset by peer]
justinmcp has joined #ruby
cornerman has quit [Read error: Connection reset by peer]
cornerman has joined #ruby
choke has joined #ruby
glenny has joined #ruby
dlitvak has joined #ruby
joonty has joined #ruby
startupality has quit [Ping timeout: 255 seconds]
mark2 has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
justinmcp has quit [Remote host closed the connection]
justinmcp has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
dlitvak has quit [Ping timeout: 260 seconds]
joonty has quit [Ping timeout: 255 seconds]
aadam21 has joined #ruby
DoubleMalt has joined #ruby
<adaedra>
Hi
TomyWork has joined #ruby
<agent_white>
iH
SCHAAP137 has joined #ruby
<Luke-Du>
Hello
choke_ has joined #ruby
choke has quit [Read error: Connection reset by peer]
yes`r has quit [Ping timeout: 240 seconds]
CloCkWeRX has joined #ruby
bkxd has joined #ruby
startupality has joined #ruby
pawnbox_ has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
dwfait has joined #ruby
<shevy>
yo Luke Duke
choke_ has quit [Read error: Connection reset by peer]
choke has joined #ruby
bkxd has quit [Ping timeout: 265 seconds]
startupality has quit [Client Quit]
brunto has joined #ruby
kies^ has joined #ruby
choke has quit [Read error: Connection reset by peer]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandstrom has joined #ruby
<agent_white>
I am moving today/tomorrow :)
<agent_white>
No more anomalies/intermittent disconnects in internet usage.
firstdayonthejob has quit [Ping timeout: 272 seconds]
rkazak has quit [Excess Flood]
steffkes has joined #ruby
<shevy>
moving to?
steffkes has quit [Changing host]
steffkes has joined #ruby
<shevy>
JAPAN?
<agent_white>
The city :) I've been watching cows for 2 years. Back to watching humans!
karapetyan has quit [Remote host closed the connection]
<silverdust>
thanks
karapetyan has joined #ruby
joonty has joined #ruby
chussenot has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
bkxd has joined #ruby
FooMunki has joined #ruby
arup_r has quit [Remote host closed the connection]
devbug has quit [Read error: Connection reset by peer]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ascarter has joined #ruby
Xeago has quit [Remote host closed the connection]
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
cmolenda_ has joined #ruby
roshanavand has joined #ruby
roshanav_ has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
* pontiki
waves o/
cmolenda has quit [Ping timeout: 245 seconds]
Xeago has joined #ruby
aadam21 has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
phredus has quit [Remote host closed the connection]
DEA7TH has joined #ruby
DEA7TH has quit [Client Quit]
Xeago has quit [Remote host closed the connection]
sandstrom has quit [Quit: My computer has gone to sleep.]
danielpclark has quit [Quit: Leaving]
karapetyan has quit [Remote host closed the connection]
rns has quit [Ping timeout: 265 seconds]
karapetyan has joined #ruby
dangerousdave has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
karapetyan has quit [Remote host closed the connection]
anisha_ has joined #ruby
platzhirsch has left #ruby [#ruby]
roobee has joined #ruby
Xeago has joined #ruby
dlitvak has joined #ruby
cmolenda has joined #ruby
<roobee>
Hello guys, this is a relatvely simple question, can anyone help me please? Here's the code (with explanation with what I get and what I want to get) thanks!
<roobee>
>canton7 I understand, not in a hurry anyway :)
dlitvak has quit [Remote host closed the connection]
krzkrz has quit [Read error: Connection reset by peer]
<apeiros>
roobee: you iterate over the whole text for each redacted word
<apeiros>
roobee: you should have the text_words as the outer loop. and as the inner loop, you test whether you want to print the word, or redacted (which you'll have to do a bit differently from how you try now)
anisha_ has quit [Quit: Leaving]
FernandoBasso has joined #ruby
justinmcp has quit [Quit: justinmcp]
yfeldblum has quit [Ping timeout: 260 seconds]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
brunto has quit [Ping timeout: 265 seconds]
<roobee>
apeiros I don't know what an outer/inner loop is. Is that just the order they appear?
_joes___ has quit []
_joes___ has joined #ruby
cmolenda_ has joined #ruby
<niemcu>
roobee: yes, basically.
cmolenda has quit [Read error: Connection reset by peer]
<roobee>
ok. thanks
aadam21 has quit [Ping timeout: 256 seconds]
krzkrz has joined #ruby
baweaver has joined #ruby
_joes___ has quit [Client Quit]
<apeiros>
roobee: outer.each do |x| inner.each do |y| …
_joes_ has joined #ruby
<apeiros>
if you'd properly indent, you'd see it visually too (yes, that's a hint with a sledge-hammer, take it :-p)
m8 has joined #ruby
<niemcu>
yes, and I'd call that pretty important point.
c355e3b has joined #ruby
<roobee>
what identation rules did I break? I'm basically a 2-hour experience beginner, been writing on the codeacademy console
BSaboia has joined #ruby
<niemcu>
anytime you open new block of code, you should indent.
ibouvousaime has joined #ruby
baweaver has quit [Ping timeout: 255 seconds]
<niemcu>
it helps understand what parts are responsible for specific things, and makes code a lot more readable
blub` is now known as blub
<niemcu>
hint: you don't want this two ends in one column ;)
xet7 has quit [Quit: Leaving]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<roobee>
well now I have 3 in one column, time to go fix that xD
ascarter has joined #ruby
<niemcu>
definitely!
Xeago has quit [Remote host closed the connection]
<roobee>
oooh now I see the outer loops! thanks guys
<roobee>
yes, it got 10 times easier
DEA7TH has joined #ruby
cmolenda_ has quit [Remote host closed the connection]
phredus has joined #ruby
roshanav_ has quit [Remote host closed the connection]
xet7 has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
<roobee>
I was thinking of assigning a variable to each array element but, before even knowing how to do that, I have no way of knowing how many elements the array will have. so that's not it :/
dlitvak has joined #ruby
<bob_f>
Is there an equivalent short-hand to `a.map(:&method)` for hash access, i.e. a.map { |x| x["key"] } ?
icarus has quit [Read error: Connection reset by peer]
<Kiedisticelixer>
Q: In my game Im drawing five layers: 1 and 2 is map, 3 is player and 4 is map but above player. But I want my fog to be below the player but above the highest map layer, any ideas?
icarus has joined #ruby
<Kiedisticelixer>
Im adjusting all with Z
<bob_f>
toretore: Had to step out for a sec, thanks for the answer.
<domgetter>
Kiedisticelixer: maintain an array of layers, and draw them in order every time
karapetyan has quit [Ping timeout: 260 seconds]
dlitvak has joined #ruby
<Kiedisticelixer>
Aw, thats slightly beyond my expertise, but I will try, thank you
<domgetter>
Kiedisticelixer: what library are you using to make a game? Or are you doing it from scratch in Ruby?
karapetyan has joined #ruby
bluOxigen has joined #ruby
colegatron has joined #ruby
<Kiedisticelixer>
Using RGSS
zotherstupidguy has quit [Quit: WeeChat 1.3]
<niemcu>
interesting, never heard of that one
bluOxigen has quit [Ping timeout: 240 seconds]
startupality has quit [Quit: startupality]
kalopsian has joined #ruby
bluOxigen has joined #ruby
Snowy has quit [Remote host closed the connection]
brunto has joined #ruby
dlitvak has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
<Kiedisticelixer>
Ruby Game Scripting System,if you have heard of that
bluOxigen has left #ruby [#ruby]
leksster has joined #ruby
aadam21 has joined #ruby
lidenbrock has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
peeja has joined #ruby
dlitvak has joined #ruby
Mon_Ouie has joined #ruby
bithon has quit [Ping timeout: 245 seconds]
steerio has joined #ruby
<steerio>
hi, does anyone know where to find HTTP::Response::STATUS_CODES, which gem?
<steerio>
it seems like reel somehow forgets to depend on it
<SCHAAP137>
nokogiri maybe?
ibouvousaime has quit [Ping timeout: 256 seconds]
DEA7TH has quit [Ping timeout: 246 seconds]
<steerio>
nope, nokogiri is in my gemfile.lock
<steerio>
and requiring it explicitly doesn't seem to define HTTP either
nixmaniack has quit [Remote host closed the connection]
nixmaniack has joined #ruby
mistermocha has quit [Ping timeout: 276 seconds]
<steerio>
weirdly enough, google is no help either
DEA7TH has joined #ruby
yes`r has quit [Ping timeout: 265 seconds]
lidenbrock has quit [Ping timeout: 252 seconds]
<niemcu>
Rack::Utils module?
peeja has quit [Ping timeout: 250 seconds]
<bob_f>
steerio: Tried grepping your gems directory for "STATUS_CODES" ?
<jhass>
how about the http gem?
<jhass>
let's ask omniref I guess
<steerio>
jhass: yeah that's what I got
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<steerio>
so yeah, HTTP::Response exists, but HTTP::Response::STATUS_CODES (looked for by Reel) doesn't
<thevishy>
I am just thinking if fluentd only accepts JSON
aegis3121 has joined #ruby
ziyadb has joined #ruby
<thevishy>
someone is an expert, anyone can be an expert!
RubieNewbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FooMunki has quit [Quit: FooMunki]
RubieNewbie has joined #ruby
FooMunki has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
<Bish>
why the f is it so hard to get a ruby2+ working on ubuntu, what did they smoke?! ( not a real question, just mad ).
mic_e has joined #ruby
<blub>
lol
<ljarvis>
its not hard
RubieNewbie has quit [Client Quit]
slackbotgz has joined #ruby
<ljarvis>
install chruby, ruby-install, build ruby 2, point chruby at it
DoubleMalt has joined #ruby
<Bish>
how is it not hard!? standard is 1.9, if you install 2.0 GREAT the binaries just lay there
<Bish>
oh great whe have "update alternatives" which never works
<ljarvis>
huh?
TomPeed has joined #ruby
<ljarvis>
why even use aptitude?
<ljarvis>
build it yourself if the package manager doesn't work
<ljarvis>
this is difficult if you make it difficult
<Bish>
because what else is there? i never liked ubuntu, but every mf uses it on his servers for some reason
<Bish>
well, i feel like, it could get worse if i install stuff around the package manager
<Bish>
it makes it untidy and unreliable
RubieNewbie has joined #ruby
kgirthofer has joined #ruby
<Lloyd>
eh?
<ljarvis>
I disagree
RubieNewbie has quit [Client Quit]
<Bish>
well i have no clue what other sh* ubuntu does, maybe it walks over the files it does who knows what with it
<ljarvis>
many package managers aren't great. The Ruby code is provided to you by the Ruby authors. Just build it yourself
<Bish>
how can you be sure, if you install ruby with make install, it won't get overwritten by some update
<ljarvis>
Bish: stop with this language please, even if it's not explicit, it's not welcome here
smactive has joined #ruby
<Lloyd>
just make your own package and install it through apt
<Lloyd>
then you don’t need to worry
<ljarvis>
Bish: you get to decide those things as you're building it, though
<Bish>
yeah learn how to build packages for the package manager i hate
<ljarvis>
i.e install it into ~/ruby if you want
<Bish>
im pretty sure i would lose my mind if i did that
phreakocious has quit [Quit: gotta go]
<Bish>
ljarvis: i did this with rvm, but now i want to use it with sudo, and hell breaks loose
<ljarvis>
yeah I wouldn't recommend using apt if you don't like it, so I recommend building yourself or using a third party tool which is built to save you from these kind of scenarios
<ljarvis>
why the heck would you use it with sudo?
<ljarvis>
also, I strongly discourage use of rvm
<Bish>
yeah i will never use it again, its crap
<Bish>
sorry for language
<Bish>
didn't think
<atmosx>
ljarvis: rvm discourages sudo too heh
<ljarvis>
so, to reiterate; install chruby
chipotle has joined #ruby
<Lloyd>
I view rvm as a development tool, not for use in production
<Bish>
aehh thing is, i wanted ruby to handle bounces from postfix
<ljarvis>
atmosx: yeah that's not a problem I have with it :)
<Bish>
which worked juuuuust fine, on a decent distribution
<atmosx>
ljarvis: I'm quite with rvm but I don't wanna change the topic of the conversation :-P
duckpuppy has joined #ruby
<Bish>
(postfix usually usese "nobody" to execute the script.. which worked fine on my machine because ruby management is much better,)
Xeago has quit [Remote host closed the connection]
<ljarvis>
what machine is that?
<Bish>
gentoo
<ljarvis>
ah, gentoo <3
malconis has joined #ruby
<Bish>
idd.
<atmosx>
gentoo++
<atmosx>
hehe
smactive has quit [Ping timeout: 240 seconds]
<atmosx>
I wonder if anyone is using gentoo in production servers
<ljarvis>
I did a 14 hour stage-1 install back when I was young enough to not have to work for a living
<Bish>
i did/done htat
<ljarvis>
anyway we're going offtopic a bit now :)
bkxd has joined #ruby
<thevishy>
Can anyone who uses fluentd in here - please tell me if I could load normal logs? Or do I need to JSONify it?
<Bish>
atmosx: but after a while.. i got sick of the installation routine :D, but ljarvis is right, kinda offtopic, but they have been the best servers there are i loved them like my childs
<Bish>
.oO(i don't have children)
gusTester has joined #ruby
<atmosx>
ljarvis: I used gentoo as my desktop OS for like 5 years
krobzaur has joined #ruby
freerobby has joined #ruby
<atmosx>
Bish: I can imagine heh
ellistaa has quit [Quit: ellistaa]
<ljarvis>
yeah me too, maybe longer
<atmosx>
ljarvis: and what OS you using now as desktop?
bkxd has quit [Ping timeout: 240 seconds]
bMalum has quit [Ping timeout: 276 seconds]
nixmaniack has quit [Remote host closed the connection]
<Bish>
http://stackoverflow.com/a/21067059 <= now this is just crazy, why would i not use linux from scratch if i have to do this to get a not even new version of ruby to run
ibouvousaime_ has quit [Ping timeout: 255 seconds]
<Bish>
jesus
<Bish>
sorry, i gonna stop now.
<ljarvis>
atmosx: OSX
hxegon has joined #ruby
sgambino has joined #ruby
<atmosx>
ljarvis: me too
<Lloyd>
the brightbox ruby ppa is opinionated
ibouvousaime_ has joined #ruby
roshanavand has joined #ruby
agent_white has quit [Remote host closed the connection]
whippythellama has joined #ruby
babblebre has joined #ruby
jmignault has joined #ruby
x-user has joined #ruby
haylon has joined #ruby
roshanavand has quit [Ping timeout: 260 seconds]
marcoecc has quit [Read error: Connection reset by peer]
marcoecc has joined #ruby
nixmaniack has joined #ruby
<timonv>
Would advise for production usage to just compile from source
anisha_ has quit [Quit: Leaving]
weemsledeux has joined #ruby
roshanavand has joined #ruby
ellistaa has joined #ruby
bubbys has quit [Ping timeout: 260 seconds]
Coldblackice has quit [Ping timeout: 240 seconds]
sankaber has joined #ruby
x-user has quit [Quit: x-user]
phreakocious has joined #ruby
bigkevmcd has joined #ruby
mistermocha has joined #ruby
* Bish
downloads a ubuntu server iso, burns it to a dvd, and burns it in his oven
aadam21 has quit [Ping timeout: 260 seconds]
SenpaiSilver has quit [Read error: Connection reset by peer]
scripore has quit [Quit: This computer has gone to sleep]
houhoulis has joined #ruby
marcoecc has quit [Ping timeout: 260 seconds]
scripore has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
scripore has quit [Remote host closed the connection]
kobain has joined #ruby
TomPeed has joined #ruby
ubear has joined #ruby
tjohnson has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
slackbotgz has quit [Remote host closed the connection]
slackbotgz has joined #ruby
<Bish>
woop woop got ruby 2.0 running, welcome to 2013
sergey_makagon has joined #ruby
ubear has quit [Client Quit]
aadam21 has joined #ruby
aspire has joined #ruby
chouhoulis has joined #ruby
Mon_Ouie has quit [Quit: WeeChat 1.3]
chipotle has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
dlitvak has quit [Read error: Connection reset by peer]
huyderman has quit [Remote host closed the connection]
brunto has quit [Read error: Connection reset by peer]
solars has quit [Ping timeout: 260 seconds]
dlitvak has joined #ruby
brunto has joined #ruby
sergey_makagon has quit [Remote host closed the connection]
leksster has quit [Remote host closed the connection]
sumark has quit [Remote host closed the connection]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 250 seconds]
nixmaniack has quit [Read error: Connection reset by peer]
<havenwood>
Bish: How'd you install Ruby? Where'd you install it to?
<gheegh>
hey all, i've got an activerecord object.. that i'm trying to set some values on, but it doesn't seem to let me.. here's the gist of what i'm trying to do.. https://gist.github.com/wflanagan/9de9b7160b6bfddd0ab3
<cold_zero>
havenwood: thank you. Do you think it will help me with my case?
mrtomme has quit [Ping timeout: 246 seconds]
<Bish>
havenwood: i just used brightbox ppa, to install it
<havenwood>
cold_zero: I think it would, at least I'd have an easier time using slop.
<Bish>
i installed both global gem(with root) and locally (with --user-install)
<cold_zero>
havenwood: thank you :-)
<Bish>
which actually works, but not if i do a "sudo" ( im not actually using sudo, postfix invokes the script as the right user )
<Bish>
which seems in resulting ruby not to know where to find gems
mrtomme has joined #ruby
emilianork has joined #ruby
<Ebok>
gheed: did you add the eval method to the class Agent?
<Ebok>
Agent doesnt appear to have the eval method, so I'm just wondering
<havenwood>
Bish: Do you have --user-local set in a gemrc or something?
mistermocha has joined #ruby
<havenwood>
Bish: You could always use chruby to keep gem bin/ in PATH with your RUBY_ env vars set correctly!
<havenwood>
That's pretty much all chruby does. :)
<emilianork>
Hello,
<havenwood>
emilianork: hi
<Bish>
havenwood: i don't have a .gemrc
PaulCape_ has joined #ruby
<Bish>
can i tell ruby to use the global gem thingie?
<Ebok>
Er.. I mispelled his name
<havenwood>
Bish: Did you switch to your Brightbox Ruby with ruby-switch or you only have one Ruby installed?
<Ebok>
gheegh: I dont see the #eval method declared without your new Object Agent
<Ebok>
within*
mary5030 has joined #ruby
finisherr has quit [Quit: finisherr]
<gheegh>
I thought eval was a part of the base class in ruby ?
PaulCapestany has quit [Ping timeout: 245 seconds]
<Ebok>
I've never used it, so, I suspect it's time to go find out
<Bish>
havenwood: i only have one ruby installed
ibouvousaime_ has quit [Ping timeout: 240 seconds]
dlitvak_ has quit [Read error: Connection reset by peer]
slackbotgz has quit [Remote host closed the connection]
dlitvak has joined #ruby
<gheegh>
Ebok: Maybe I need instance_eval?
<havenwood>
Bish: Wait, I'm confused. You want non-sudo to install to a system location?
<havenwood>
Bish: Or it's sudo that's not properly installing to the system location?
baweaver has joined #ruby
<havenwood>
if (( UID != 0 )); then
jas02 has quit [Quit: jas02]
<Bish>
i install gems with root, and i cannot simply require them as user
emilianork has quit [Ping timeout: 252 seconds]
<Bish>
that's the issue i am having
bkxd has joined #ruby
<Bish>
even though Gem.default_dir="/var/lib.."
<Ebok>
Honestly, gheegh, I've been learning code for 2 months. I'm not entire sure ^_^. You'r right though, it is within the Object class.
<Bish>
well, i see what the reason is
futilegames has joined #ruby
platzhirsch has left #ruby [#ruby]
thevishy has left #ruby ["WeeChat 1.4-rc1"]
<Bish>
fml.. rvm wrote Gem.dir
krzkrz has quit [Ping timeout: 272 seconds]
BSaboia has quit [Ping timeout: 256 seconds]
ibouvousaime_ has joined #ruby
* havenwood
goes in search of coffee
chouhoulis has quit [Remote host closed the connection]
<cold_zero>
havenwood: one more question about "slop". Do you know is it possible to specify possible types of value provided for flags. For example for "-e" flag I can provide list of files like "file1 file2 file3" or REGEX like "*.txt"
chouhoulis has joined #ruby
<Bish>
it's still not working jesus christ
baweaver has quit [Ping timeout: 255 seconds]
kies^ has joined #ruby
hakunin has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
Snowy has quit [Read error: Connection reset by peer]
<aegis3121>
cold_zero: the docs appear to suggest yes, sort of.
<aegis3121>
I think if you're looking for a custom option (i.e. one that accepts both), you'd need to make...your own custom option class, as it suggests.
<cold_zero>
aegis3121: thank you :)
lacuna has quit [Remote host closed the connection]
Snowy has joined #ruby
roshanav_ has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
ibouvousaime_ has quit [Ping timeout: 260 seconds]
Snowy has quit [Remote host closed the connection]
marcoecc has joined #ruby
<Bish>
havenwood: well thank you, you helped alot
domgetter has joined #ruby
s00pcan has quit [Ping timeout: 260 seconds]
sankaber has quit [Remote host closed the connection]
sankaber has joined #ruby
s00pcan has joined #ruby
rodfersou|lunch is now known as rodfersou
aegis3121 has quit [Ping timeout: 265 seconds]
catphish has joined #ruby
arup_r has joined #ruby
psy_ has joined #ruby
dlitvak has quit [Read error: Connection reset by peer]
gusTester has quit [Ping timeout: 246 seconds]
<catphish>
i have a really silly question, how do i send data using UDPSocket? the documentation talks about #send, but #send has a totally different meaning (it tries to call a method)
gusTester has joined #ruby
Snowy has joined #ruby
sergey_makagon has quit [Remote host closed the connection]
ellistaa has joined #ruby
dlitvak has joined #ruby
roshanav_ has quit [Remote host closed the connection]
<ruboto>
Bish # => uninitialized constant UDPSocket (NameError) ...check link for more (https://eval.in/498178)
<Bish>
:(
FooMunki has joined #ruby
rrichardsr3 has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra>
You have to require socket, Bish. But I don't think eval.in will let you socket like that.
<adaedra>
By the way
<adaedra>
>> RUBY_VERSION
<catphish>
Bish: i did exactly that, but i ignored the uninitialized constant error, and tried to call "send" on nil, which confused me because stupidity :)
RegulationD has quit [Remote host closed the connection]
DoubleMalt has quit [Remote host closed the connection]
kies^ has quit [Ping timeout: 240 seconds]
choke__ has quit [Ping timeout: 265 seconds]
jpfuentes2 has joined #ruby
<domgetter>
ellistaa: they want you to add up bits in an array. but they want you to modify each one before you add it up. the modification is "the bit value (0 or 1) multiplied by -2 raised to where the bit is in the array (its index)"
choke has quit [Ping timeout: 265 seconds]
ascarter has joined #ruby
<domgetter>
so [1, 0, 1] would be 1*(-2)^(0) + 0*(-2)^(1) + 1*(-2)^(2)
<ellistaa>
dogmetter: but whats with the ‘for i = 0 N-1’ doesn’t that mean i is always the length of the array?
cschneid_ has joined #ruby
<domgetter>
you can see that the power I'm raising -2 by is increasing for every bit
ta has quit [Read error: Connection reset by peer]
<domgetter>
up to the length of the array minus one, yes
<domgetter>
i in that case is whatever index we're at for that bit
<ellistaa>
ok i was squaring it based on the length of the array minus 1 not the index value
DoubleMalt has joined #ruby
<domgetter>
you can see that for the second bit in my 101 example, that we raise to 1 since 1 is the second index of an array
rontec76 has joined #ruby
mary5030 has quit [Remote host closed the connection]
dlitvak_ has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
uri_ has quit [Quit: --]
wldcordeiro has joined #ruby
<domgetter>
of course, that's only half the problem. the other thing is that they want you to spit out negative numbers?
troulouliou_div2 has joined #ruby
celly has joined #ruby
ta has joined #ruby
baweaver has joined #ruby
rontec76 has left #ruby [#ruby]
houhoulis has quit [Remote host closed the connection]
bkxd has joined #ruby
mattr__ has joined #ruby
ronplastic has joined #ruby
lacuna has quit [Remote host closed the connection]
elektronaut has joined #ruby
bluOxigen has joined #ruby
bluOxigen_ has quit [Ping timeout: 260 seconds]
lucasb has quit [Quit: leaving]
CorySimmons has quit [Quit: Bye!]
dgarstang has joined #ruby
baweaver has quit [Ping timeout: 256 seconds]
choke has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
peeja has joined #ruby
<dgarstang>
Where can I find good examples of how to use the ruby aws sdk? Specifically I get to get cloudformation stack outputs. Theres a lot of examples for python boto3 but if you google the equivalent operatons for ruby, there's very very little except API references which makes it hard for people to start using it
finisherr_ has joined #ruby
<azggil>
seems need multiply 2
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
Xeago has quit [Remote host closed the connection]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
finisherr has quit [Ping timeout: 246 seconds]
finisherr_ is now known as finisherr
lacuna has quit [Remote host closed the connection]
jackjackdripper has quit [Ping timeout: 265 seconds]
<speakingcode>
"Clas: AWS....::Client Overview: an api client for AWS CloudFormation. To construct a cleint you need to configure a :region and :credentials" example follows
<dgarstang>
(that's whats at the top of the doc)
<speakingcode>
do you have much ruby experience
<speakingcode>
?
Snowy has quit []
<speakingcode>
you construct with .new()
<dgarstang>
speakingcode: No. I hate it, but I gotta use it
<choke>
I can confirm that it's pretty similar. I've got something similar that talks to S3, CodeDeploy and AppStream
jackjackdripper has joined #ruby
Xeago has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DEA7TH has quit [Quit: DEA7TH]
* choke
gasps... hate.. ruby?!?
<speakingcode>
dgarstang: not trying to be an ass, but you would probably greatly benefit from brushing up on some basic ruby chops, particularly Object Oriented stuff
poguez_ has joined #ruby
<dgarstang>
tacking a .new on the end won't help, as it reports "undefined method `Client' for Aws::CloudFormation:Module (NoMethodError)"
Yiota has joined #ruby
<choke>
the syntax is so pretty though
choke has quit [Read error: Connection reset by peer]
<speakingcode>
codecademy.com may be a good place to start if you like interactive practice, or the pickaxe book from dave thomas, or the ruby koans
<dgarstang>
speakingcode: I've been doing python for 15 years. ruby makes my eyes bleed. Trust me, I've tried many many times and it just makes no sense to me
<speakingcode>
dgarstang: well i don't want to get into a language debate, i'm just saying going back to basics would probably help you because your confusion seems to stem from not understanding some basics of classes and instantiation
<apeiros>
dgarstang: time to write a cheatsheet so you remember?
<speakingcode>
if you look at the very top of that doc
<dgarstang>
speakingcode: No, it's the ruby implementation of it
<speakingcode>
what you have to understand dgarstang is initialize is a CLASS method, that returns an instance object of its class, and is called via new()
<dgarstang>
speakingcode: sure, python does the same thing. it's the ruby syntax that grates me
<apeiros>
speakingcode: uh, initialize is an instance method. new is a class method.
<dgarstang>
speakingcode: in python it's foo = Object(...). In ruby it's a lot more complicated
<azggil>
use python
<dgarstang>
azggil: it's chef. Can't
<azggil>
kill him and use right tool
<apeiros>
in ruby it's foo = Object.new. truly complicated indeed.
<speakingcode>
apeiros: err yeah, sorry got it backwards
<apeiros>
speakingcode: happens
<dgarstang>
apeiros: you mean Aws::CloudFormation::Client.new()
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<speakingcode>
dgarstang: yes.
baweaver has joined #ruby
DoubleMalt has joined #ruby
<apeiros>
dgarstang: possibly. I haven't looked at AWS' API
<speakingcode>
the () are optional
<dgarstang>
Don't suppose anyone knows the way to get cfn stack outputs via the sdk
Hounddog has quit [Ping timeout: 250 seconds]
<speakingcode>
for aws sdk specific questions you might try the chef or aws channels as well
<dgarstang>
it's not clear (no examples) if I can just call a method on the Cfn object or if I have to dig down several object levels, which means trying to interpret that API doc
<speakingcode>
whats the Cfn object?
nspeare has left #ruby [#ruby]
troulouliou_div2 has quit [Ping timeout: 260 seconds]
<dgarstang>
speakingcode: cloudformation
aryaching has quit [Ping timeout: 245 seconds]
nspeare has joined #ruby
icarus has quit [Ping timeout: 276 seconds]
<speakingcode>
i don't see a cloud formation object in here
<speakingcode>
it's like a package/namespace so to speak
<speakingcode>
i forget what the python equiv is
ascarter has joined #ruby
<dgarstang>
so...
<azggil>
about (-2)^n+(-2)^(n-1)...
baweaver has quit [Remote host closed the connection]
<choke>
by "stack outputs" what exactly do you mean
inukshuk_ has joined #ruby
<dgarstang>
well I got some sort of an object because I'm pretty sure I haven't assigned a module reference to a variable here
icarus has joined #ruby
<apeiros>
azggil: if that's your ruby code for the base -2 problem, note that ^ is XOR, not power. ** is power.
<dgarstang>
choke: CloudFormation stacks have well defined outputs
scottschecter has joined #ruby
<nspeare>
quit
duckpuppy has joined #ruby
nspeare has quit [Client Quit]
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
<azggil>
seems possibly shorten to (x^2n+x^2n-2...)-(x^2n-1-x^2n-3...)
stannard_ has joined #ruby
pdoherty has joined #ruby
<dgarstang>
so it looks like the CloudFormation 'module' has a Stack class... which has an outputs attribute.... but how to get it...
icarus has quit [Client Quit]
<choke>
and these outputs are what exactly? I don't use CloudFormation so I don't know... Looking @ the API docs however... you've got methods such as list_stacks, describe_stack_*
<speakingcode>
so dgarstang back to the 'Client' class doc
<speakingcode>
at the top it shows you how to construct a client object
inukshuk_ has quit [Client Quit]
<dgarstang>
speakingcode: How do I get a Stack object from that?
<dgarstang>
speakingcode: I don't want to call describe stacks do I? i just want to get outputs for a particular stack
<dgarstang>
oh i see
<dgarstang>
guess I do
stannard has quit [Ping timeout: 245 seconds]
<dgarstang>
time to go update IAM. Ugh
<speakingcode>
there's a list_stacks method also, but i don't have AWS experience so i don't know the semantic meaning of that stuff
aegis3121 has joined #ruby
lacuna has quit [Read error: Connection reset by peer]
sonOfRa has quit [Quit: Bye!]
ibouvousaime_ has quit [Ping timeout: 272 seconds]
<dgarstang>
speakingcode: I think I'm good now, thanks.... until the next ruby eye bleed inducement
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
dlitvak has quit [Remote host closed the connection]
lurch_ has quit [Quit: lurch_]
sonOfRa has joined #ruby
<speakingcode>
sonOfRa: cool name
lurch_ has joined #ruby
lurch_ has quit [Client Quit]
<speakingcode>
dgarstang: it looks like describe_stacks() returns a DescribeStacksOutput object, which has a method stacks() that returns an array of Stack objects
anisha_ has joined #ruby
<choke>
list_stacks does essentially the same thing, but can be told to only achieve ones with a specific stack_status
Porfa has quit [Quit: Porfa]
aufi has quit [Quit: Konversation terminated!]
Porfa has joined #ruby
<choke>
But, time for me to head in to the office.. so see you all later
jam_ has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
haylon has quit [Quit: Leaving]
Ebok has quit [Quit: Internet is down or Computer is restarting. I'll be back.]
nspeare has joined #ruby
jam_ has quit [Ping timeout: 250 seconds]
baweaver has joined #ruby
ht__ has joined #ruby
nertzy has joined #ruby
Xeago has quit [Remote host closed the connection]
Zackio has quit [Quit: C-x C-c]
benlieb has joined #ruby
guacamole has joined #ruby
webus has joined #ruby
wolffles has joined #ruby
Zackio has joined #ruby
PsionTheory has joined #ruby
lacuna_ has joined #ruby
lacuna has quit [Ping timeout: 250 seconds]
geekbri has joined #ruby
<wolffles>
method to add an array of fix numbers?
<azggil>
sample?
DoubleMalt has quit [Remote host closed the connection]
<wolffles>
array = %w[1 8 27]
<aegis3121>
What do you mean by "add an array of fix numbers"?
<wolffles>
sum of the integers
JazzyVariable227 has joined #ruby
<wolffles>
sorry i worded it wrong
<nspeare>
quit
<aegis3121>
Have you checked if a method on Array or Enumerable would work?
nspeare has quit [Quit: WeeChat 0.3.8]
craysiii has quit [Ping timeout: 260 seconds]
<aegis3121>
#reduce would be what you want, I imagine
<wolffles>
the methods i know all return arrays
<aegis3121>
did you check Reduce?
<wolffles>
i mean i can do it logically but just wondering if theres a method to simplify it
<wolffles>
ahh aegis3121: that was exactly what i was looking for
blackmesa has joined #ruby
arup_r has quit []
SCHAAP137 has joined #ruby
JazzyVariable227 has quit [Ping timeout: 260 seconds]
sigurding has joined #ruby
<azggil>
smart coder
mistermo_ has joined #ruby
<azggil>
he could understand doc
<wolffles>
i was searching docs
RegulationD has joined #ruby
<wolffles>
but looking under arrays
<wolffles>
derp :]
nspeare has joined #ruby
<baweaver>
Enumerable
<baweaver>
but still, no need to be mean
<eam>
it'd be a fantastic feature for class docs to also show inherited methods
<eam>
or I should rather say it's a misfeature that they don't
<aegis3121>
wolffles: no problem
B1n4r10 has joined #ruby
<aegis3121>
Enumerable is (at least to help me think about it) the definition of Ruby's idea of a collection. Any collection I would hope includes it, and I would probably assume it does.
<eam>
it's a broad problem, not specifically related to enumerable
RegulationD has quit [Ping timeout: 264 seconds]
<eam>
people want to operate on an object and there's no good place to find all methods associated with it
sigurding has quit [Quit: sigurding]
<aegis3121>
I know that ruby-doc.org tells you which Modules have been included.
stamina has joined #ruby
<azggil>
inject and reduce are synonims?
dlitvak_ has joined #ruby
<aegis3121>
yep
jbrhbr has quit [Quit: Leaving.]
<aegis3121>
As are collect and map, I think.
Kruppe has joined #ruby
friendofkiwi has joined #ruby
friendofkiwi has left #ruby [#ruby]
<wolffles>
never knew that
roshanavand has quit [Ping timeout: 260 seconds]
techietrash has quit [Max SendQ exceeded]
techietrash has joined #ruby
Xeago has joined #ruby
<azggil>
creaters didnot read docs
<azggil>
carefully
celly has joined #ruby
dlitvak has quit [Ping timeout: 276 seconds]
prestorium has quit [Quit: Leaving]
colegatron has joined #ruby
JazzyVariable227 has joined #ruby
JazzyVariable227 has quit [Remote host closed the connection]
anisha_ has quit [Quit: Leaving]
<azggil>
damn niggers
mahlon_ is now known as mahlon
<apeiros>
!kick azggil language
azggil was kicked from #ruby by ruboto [language]
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
RegulationD has joined #ruby
wprice has joined #ruby
azggil has joined #ruby
<azggil>
rr
<eam>
what's the best way to inspect the build parameters of a ruby binary?
<apeiros>
eam: RbConfig probably
<drbrain>
yep
<apeiros>
not sure, though
<drbrain>
everything you should need (for linking to ruby after install) is in RbConfig
symm- has quit [Quit: Leaving...]
<eam>
I want to see if -DHAVE_SENDFILE=0 was set
cdg has joined #ruby
araujo has quit [Quit: Leaving]
techietrash has quit [Max SendQ exceeded]
zeroDivisible has joined #ruby
KnownSyntax has quit [Ping timeout: 256 seconds]
techietrash has joined #ruby
techietrash has quit [Changing host]
techietrash has joined #ruby
<eam>
aha success RbConfig::CONFIG.values.grep /SEND/ thanks much
choke has quit [Read error: Connection reset by peer]
paultreny has quit [Max SendQ exceeded]
guacamol_ has joined #ruby
paultreny has joined #ruby
paultreny is now known as Guest68983
techietrash has quit [Client Quit]
<eam>
it appears that ruby still calls sendfile() even with that disabled
Guest68983 has quit [Remote host closed the connection]
<eam>
it only disables some paths to that syscall, but not all
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
davedev24 has joined #ruby
jbrhbr has joined #ruby
dfockler has joined #ruby
guacamole has quit [Ping timeout: 250 seconds]
choke has joined #ruby
ur5us has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
FernandoBasso has quit [Quit: Leaving]
dlitvak_ has quit [Remote host closed the connection]
mistermocha has quit [Remote host closed the connection]
dionysus69 has quit [Quit: dionysus69]
baweaver has quit [Remote host closed the connection]
rdark has quit [Ping timeout: 255 seconds]
firstdayonthejob has joined #ruby
Marsupermammal has joined #ruby
mistermocha has joined #ruby
nertzy has joined #ruby
startupality has joined #ruby
HowardwLo has joined #ruby
isjaylee has joined #ruby
Porfa has quit [Quit: Porfa]
Porfa has joined #ruby
haraigoshi has joined #ruby
finisherr_ has joined #ruby
finisherr has quit [Ping timeout: 265 seconds]
finisherr_ is now known as finisherr
<hxegon>
is there a way to force something into bool other than double negation (!!)?
<azggil>
what is better to be a super pro in one technology or exploring different tech areas but without depp knowledges
cdg has quit [Remote host closed the connection]
<hxegon>
azggil well, it depends. Personally I'd say be a generalist, but being a specialist pays more IMO
<azggil>
so generalist is cooler
spider-mario has joined #ruby
bb010g has joined #ruby
Xeago has quit [Remote host closed the connection]
<hxegon>
again, it depends on your personal goals.
paultreny has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
RegulationD has quit [Remote host closed the connection]
paultreny is now known as Guest36836
techietrash has joined #ruby
techietrash has quit [Changing host]
techietrash has joined #ruby
choke has quit [Read error: Connection reset by peer]
<eam>
any sufficiently advanced specialist becomes an adept generalist as well
<eam>
due to domain overlap
<wolffles>
when yall were learning ruby did you make flash cards of the methods? is that something i should do or just keep doing problems
<azggil>
i dont agree
choke has joined #ruby
Guest36836 has quit [Changing host]
Guest36836 has joined #ruby
<hxegon>
azggil in what way?
<azggil>
you need time to investigate different things
<aegis3121>
wolffles: I would say just keep going. You'll pick up on more and get more comfortable navigating the docs, too :)
<azggil>
but if u advanced how you learn others
<apeiros>
oh hey hxegon
<apeiros>
sorry, hadn't seen your email promptly
<hxegon>
wolffles do you really need to memorize them? I just look up methods until I remember the more useful ones
<hxegon>
apeiros it's all good. Not like it's a pressing matter :P
<wolffles>
i would assume you guys memorized them but i guess its through experience like aegis3121 said
<aegis3121>
hxegon agreed. You remember the more important, critical ones. You also start to get a new sense of "Hmm, this feels like a solved problem. I bet Ruby already does this for me." and you get good at guessing that it's out there.
<wolffles>
lol guess you said it too hxegon
<apeiros>
wolffles: I read through ruby core docs once
karapetyan has quit [Remote host closed the connection]
<apeiros>
and then a couple of lookups later
yashinbasement has joined #ruby
<apeiros>
that helped a lot
<eam>
I learned perl, and then I just assume that the perl functions exist attached to the similar ruby types (which is usually true)
<apeiros>
and I think by now I should probably repeat it. enough new methods I simply haven't paid attention to :)
karapetyan has joined #ruby
Xeago has joined #ruby
celly has quit [Remote host closed the connection]
jbrhbr has quit [Quit: Leaving.]
nertzy has quit [Quit: This computer has gone to sleep]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
stamina has quit [Ping timeout: 265 seconds]
Guest36836 has quit [Quit: ¯\_(ツ)_/¯]
dfockler has quit [Ping timeout: 245 seconds]
celly has joined #ruby
isjaylee has left #ruby [#ruby]
sepp2k has quit [Read error: Connection reset by peer]
northfurr has joined #ruby
sepp2k has joined #ruby
yashinbasement has quit [Ping timeout: 272 seconds]
wolffles has quit [Quit: wolffles]
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
gheegh has quit [Ping timeout: 240 seconds]
baweaver has quit [Remote host closed the connection]
<azggil>
what for
<azggil>
simply use in location bar "g i want sort/reduce/find something stuff"
startupality has quit [Quit: startupality]
baweaver has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
blackmesa has joined #ruby
jobewan has joined #ruby
aegis3121 has quit [Ping timeout: 250 seconds]
darkf has quit [Quit: Leaving]
futilegames has joined #ruby
ascarter has joined #ruby
tuzz has joined #ruby
tuzz has left #ruby [#ruby]
brunto_ has joined #ruby
brunto has quit [Ping timeout: 240 seconds]
bithon has quit [Ping timeout: 264 seconds]
<greenhat>
Review the docs for Enumerable, Array, and Hash and you are well on your way.
choke_ has joined #ruby
choke has quit [Ping timeout: 272 seconds]
sgambino_ has joined #ruby
charliesome has joined #ruby
sgambino has quit [Read error: Connection reset by peer]
JDiPierro has joined #ruby
valkyrka has joined #ruby
choke_ has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
lacuna_ has left #ruby [#ruby]
choke has joined #ruby
agentmeerkat has joined #ruby
cmolenda has quit [Remote host closed the connection]
paultreny_ has joined #ruby
Xeago has quit [Remote host closed the connection]
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
dlitvak has joined #ruby
konr has joined #ruby
charliesome has quit [Client Quit]
arup_r has joined #ruby
Ox0dea has joined #ruby
bigkevmcd has quit [Ping timeout: 260 seconds]
choke has quit [Read error: Connection reset by peer]
aibot has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
bkxd has joined #ruby
dlitvak has quit [Ping timeout: 240 seconds]
bigkevmcd has joined #ruby
choke has joined #ruby
yashinbasement has joined #ruby
bithon has joined #ruby
mjuszczak has quit []
choke has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
baweaver has quit [Ping timeout: 260 seconds]
choke has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
ellistaa has quit [Quit: ellistaa]
DEA7TH has joined #ruby
JazzyVariable227 has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
choke has quit [Read error: Connection reset by peer]
<dpg_>
I'm trying to write a ruby gem, what's a good tut on gems + oo ruby ?
<mustmodify>
Well, they're all guaranteed to be integers, otherwise that would be a good point.
<dpg_>
Keep getting "playa_device_client.rb:5:in `initialize': uninitialized constant PlayaDeviceClient::Boot (NameError)" and I don't know how to fix it. :D
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
mistermocha has quit [Remote host closed the connection]
bestbrents__ has joined #ruby
bmurt_ has joined #ruby
JDiPierro has quit [Remote host closed the connection]
blub` has joined #ruby
dravine_ has joined #ruby
infinitone_ has joined #ruby
renderf__ has joined #ruby
mistermocha has joined #ruby
diprotic has joined #ruby
diprotic has quit [Changing host]
diprotic has joined #ruby
zenspider_ has joined #ruby
blub has quit [Disconnected by services]
TomyLobo has quit [Disconnected by services]
fqulvqknpnwwaygt has joined #ruby
blackgoat_ has joined #ruby
fqulvqknpnwwaygt is now known as ddxopiyosxhcvjjk
blub` is now known as blub
ddxopiyosxhcvjjk is now known as TomyLobo
choke has quit [Read error: Connection reset by peer]
Rutix`away has joined #ruby
Rutix`away has quit [Changing host]
Rutix`away has joined #ruby
davedev24 has joined #ruby
peeja_ has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
MiracleBlue__ has joined #ruby
whippythellama has joined #ruby
angiebadillo_ has joined #ruby
peeja has quit [Ping timeout: 240 seconds]
zenspider has quit [Ping timeout: 240 seconds]
AckZ has quit [Ping timeout: 240 seconds]
avenj has quit [Ping timeout: 240 seconds]
BackEndCoder has quit [Ping timeout: 240 seconds]
catbusters has quit [Ping timeout: 240 seconds]
Amnez777 has quit [Ping timeout: 240 seconds]
jpinnix______ has quit [Ping timeout: 240 seconds]
Coraline has quit [Excess Flood]
ellistaa has quit [Ping timeout: 240 seconds]
agentmeerkat has quit [Ping timeout: 240 seconds]
render___ has quit [Ping timeout: 240 seconds]
NightMonkey has quit [Ping timeout: 240 seconds]
jmcc_____ has quit [Ping timeout: 240 seconds]
MiracleBlue_ has quit [Ping timeout: 240 seconds]
angiebadillo has quit [Ping timeout: 240 seconds]
valeri_ufo has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
jpinnix_______ has joined #ruby
mroth_ has joined #ruby
valeri_ufo has joined #ruby
cstrahan_ has joined #ruby
davedev2_ has quit [Ping timeout: 240 seconds]
blackgoat has quit [Ping timeout: 240 seconds]
Rutix has quit [Ping timeout: 240 seconds]
infinitone has quit [Ping timeout: 240 seconds]
monoprotic has quit [Ping timeout: 240 seconds]
Guest64162 has quit [Ping timeout: 240 seconds]
sjums has quit [Ping timeout: 240 seconds]
stuartb has quit [Ping timeout: 240 seconds]
Coraline has joined #ruby
angiebadillo_ is now known as angiebadillo
sjums has joined #ruby
bestbrents_ has quit [Ping timeout: 240 seconds]
bmurt has quit [Ping timeout: 240 seconds]
d0nn1e has quit [Ping timeout: 240 seconds]
dravine has quit [Ping timeout: 240 seconds]
skarn has quit [Ping timeout: 240 seconds]
tinnvec has quit [Ping timeout: 240 seconds]
jsrn has quit [Ping timeout: 240 seconds]
mroth has quit [Ping timeout: 240 seconds]
ElderFain has quit [Ping timeout: 240 seconds]
dravine_ is now known as dravine
Amnez777 has joined #ruby
Amnez777 has quit [Max SendQ exceeded]
podman has quit [Ping timeout: 240 seconds]
atumzin has quit [Ping timeout: 240 seconds]
alem0lars has quit [Ping timeout: 240 seconds]
cstrahan has quit [Ping timeout: 240 seconds]
ytti has quit [Ping timeout: 240 seconds]
mahk has quit [Ping timeout: 240 seconds]
tinnvec has joined #ruby
jmcc_____ has joined #ruby
atumzin has joined #ruby
atumzin has quit [Changing host]
atumzin has joined #ruby
marr has joined #ruby
Amnez777 has joined #ruby
Amnez777 has quit [Max SendQ exceeded]
bmurt_ has quit [Client Quit]
ytti has joined #ruby
sgambino_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agentmeerkat has joined #ruby
djbkd has quit [Remote host closed the connection]
mroth_ is now known as mroth
Amnez777 has joined #ruby
Amnez777 has quit [Max SendQ exceeded]
gatman has quit []
symm- has quit [Quit: Leaving...]
Amnez777 has joined #ruby
gatman has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
baweaver has quit [Ping timeout: 260 seconds]
cstrahan_ is now known as cstrahan
podman has joined #ruby
gatman has quit [Client Quit]
d0nn1e has joined #ruby
stuartb has joined #ruby
stannard_ has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 272 seconds]
smactive has joined #ruby
AckZ has joined #ruby
DarkBushido has joined #ruby
bmurt has joined #ruby
ElderFain has joined #ruby
BackEndCoder has joined #ruby
jsrn has joined #ruby
mahk has joined #ruby
minimalism has joined #ruby
ellistaa has joined #ruby
choke has joined #ruby
<ellistaa>
i need to write an algorithm that takes an input and an expected output, like this 314159265358 = 27182 , and somehow makes combinations to the input using +,-,*,/ to get the output e.g. 3 + 1 - 415 * 92 + 65358 = 27182. looks like i have to try every combination but i’m not sure how to do that
scripore has joined #ruby
mic_e has quit [Ping timeout: 255 seconds]
<centrx>
You want to redefine pi?
stannard has joined #ruby
<ellistaa>
centrx i guess its for a coding challenge
<Scoopfinder>
The question has also been asked here, but the anwser was slightly different from what is written on the snippet (http://logs.ryanbigg.com/p/ruby-lang260)
<centrx>
Scoopfinder, Looks like it just converts all the keys to symbols, kind of like Rails/ActiveSupport's Hash#deep_symbolize_keys
KingAbdullah has joined #ruby
Porfa has joined #ruby
celly has quit [Remote host closed the connection]
<Scoopfinder>
centrx, Ox0de' said the same several months ago ^^ But the explanations in comment on the gist got me a bit confused
choke has quit [Read error: Connection reset by peer]
* apeiros
actually said the same thing
mistermocha has joined #ruby
Snowy has quit [Read error: Connection reset by peer]
<Scoopfinder>
oh apeiros, I did not see it ^^'
<ellistaa>
does anyone know the equation to figure out how many combinations can be made with a ten digit number and 4 operators?
jam_ has quit [Ping timeout: 276 seconds]
<apeiros>
actually said it even before Ox0dea…
rrichardsr3 has joined #ruby
<apeiros>
the comments are your own?
Snowy has joined #ruby
<Scoopfinder>
apeiros, nope nope I just found it while googling the function
<Ox0dea>
apeiros: Hm?
<KingAbdullah>
Beginner here, I want to make a program that asks a user for some input (Title and input body) and than saves it in some sort of file/database or even directly to the code. What am I looking for?
<adaedra>
KingAbdullah: from a console?
<KingAbdullah>
yes
<Ox0dea>
apeiros: Disregard. I didn't notice the previous mention.
konr has quit [Quit: Connection closed for inactivity]
ur5us has quit [Remote host closed the connection]
klingeldraht has quit [Ping timeout: 250 seconds]
ur5us has joined #ruby
hxegon has joined #ruby
DonOtreply has joined #ruby
stamina has quit [Quit: WeeChat 1.3]
nerfando has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
scripore has quit [Quit: This computer has gone to sleep]
ur5us has quit [Read error: No route to host]
ur5us_ has joined #ruby
peeja_ has quit [Ping timeout: 265 seconds]
Highsen has quit [Ping timeout: 276 seconds]
klingeldraht has joined #ruby
DonOtreply has quit [Quit: DonOtreply]
choke has quit [Ping timeout: 272 seconds]
RegulationD has quit [Remote host closed the connection]
ellistaa has quit [Quit: ellistaa]
mjuszczak has joined #ruby
DonOtreply has joined #ruby
ur5us_ has quit [Ping timeout: 246 seconds]
saneax_AFK is now known as saneax
guacamol_ has joined #ruby
saneax is now known as Guest73286
guacamol_ has quit [Client Quit]
guacamol_ has joined #ruby
choke has joined #ruby
scripore has joined #ruby
guacamole has quit [Ping timeout: 240 seconds]
DonOtreply has quit [Ping timeout: 260 seconds]
Ishido has quit [Remote host closed the connection]
<kspencer>
Does anyone here work with json/etc apis where I can dump output from a script into a json string
TomyLobo has quit [Ping timeout: 264 seconds]
peeja has joined #ruby
m8 has quit [Quit: Sto andando via]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
baweaver has quit [Read error: Connection reset by peer]
last_staff has joined #ruby
DonOtreply has joined #ruby
Xeago has quit [Remote host closed the connection]
f00dMonsta__ has joined #ruby
BTRE has quit [Quit: Leaving]
pawnbox has quit [Ping timeout: 250 seconds]
bestbrents__ has quit [Quit: Leaving]
f00dMonsta_ has quit [Ping timeout: 245 seconds]
<hxegon>
kspencer not sure what you mean
f00dMonsta__ has quit [Ping timeout: 240 seconds]
[Butch] has quit [Quit: I'm out . . .]
mistermocha has quit [Remote host closed the connection]
choke has quit [Ping timeout: 272 seconds]
cmolenda has joined #ruby
last_staff has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
choke has joined #ruby
wald0 has quit [Quit: Changing server]
whippythellama has quit [Quit: WeeChat 1.3]
<kspencer>
hxegon: I have a ruby web script, but want to be able to also call it via something to bring the info into another program, say cinch or w/e bot and have it output it but formatted, and the easiest way to format is to go by use heirarchy, which involves serialization
chipotle has quit [Quit: cheerio]
dlitvak has joined #ruby
<mustmodify>
kspencer: OOOOOOooooohkkkkkkkkkkk
spider-mario has quit [Remote host closed the connection]
<mustmodify>
wowza
<mustmodify>
YOu want to do some AJAXy kind of stuff?
mistermocha has quit [Ping timeout: 240 seconds]
volty has quit [Quit: Konversation terminated!]
moei has quit [Quit: Leaving...]
wldcordeiro has quit [Ping timeout: 240 seconds]
brunto has quit [Ping timeout: 240 seconds]
<kspencer>
more api kind of stuff, think cloudflare api and its responses, you could format that, but I want to format my hierarchy of my uptime script
<mustmodify>
ok
<mustmodify>
so you want an API
<mustmodify>
what's your question?
mistermocha has joined #ruby
<mustmodify>
I'm guessing it's "How do I do that."
<Ox0dea>
kspencer: Er, are you asking how to parse JSON with Ruby?
mary5030 has quit [Remote host closed the connection]
<kspencer>
right now I have it outputting html, I want it to output json
last_staff has joined #ruby
<mustmodify>
kspencer: and is this Rails?
uri_ has quit [Quit: --]
<kspencer>
not made with rails persay but its apache+passenger+sinatra
<kspencer>
i say that because I didn't use rails as a command to build the 'app'
<Ox0dea>
kspencer: Could you clarify how it is you're displaying a Hash as HTML?
peeja has quit [Ping timeout: 255 seconds]
<mustmodify>
so you need to detect the request type and then say, "If they are requesting HTML, render this view. If they are requesting JSON, spit out JSON."
moei has joined #ruby
<kspencer>
right mustmodify, but given my script I need to know how to set up the heirarchy, and yes I will gist the code
<davzie>
Are there any frameworks out there, for a relative Ruby beginner (not a programming beginner) that would be a good fit for a REST API?
celly has joined #ruby
<davzie>
Rails seems like overkill for this task, but again, I lack experience and perspective.
cmolenda has quit [Read error: Connection reset by peer]
<mustmodify>
ACK! SSH.exec! in your views...
<mustmodify>
at least it's hard coded.
<mustmodify>
I'm pretty sure that's in a file somewhere that you can read.
<mustmodify>
instead of doing SSH.exec!
<hxegon>
davzie sinatra
<mustmodify>
Oh I see. Net::SSH
<mustmodify>
so you ... geez.
<Ox0dea>
kspencer: Right, you'll need to parse the output of `uptime`, stick the results in a Hash, and then you'll be able to call #to_json on that.
baweaver has quit [Ping timeout: 255 seconds]
cmolenda has joined #ruby
<davzie>
hxegon: Thanks H-man
<mustmodify>
Yeah, create an UptimeReport class. Then UptimeReport.new.to_hash
<hxegon>
davzie no prob, D
cmolenda has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
<kspencer>
the uptime i can fix with different commands, was more the 'type' and 'server' sections i don't know how to work in
ellistaa has joined #ruby
cmolenda has joined #ruby
projer has joined #ruby
dlitvak_ has joined #ruby
cmolenda has quit [Read error: Connection reset by peer]
cmolenda has joined #ruby
<Ox0dea>
kspencer: Just stick those in the Hash as well.
Yzguy has joined #ruby
pdoherty has quit [Ping timeout: 240 seconds]
dlitvak has quit [Ping timeout: 250 seconds]
rodfersou has joined #ruby
justinmcp has quit [Remote host closed the connection]
firstdayonthejob has quit [Ping timeout: 246 seconds]
justinmcp has joined #ruby
<projer>
In ruby, can I leave implementation of a base method to the child class, while calling it in the parent would call the child? Something similar to the template method pattern
ta has joined #ruby
<Ox0dea>
projer: You sure can.
<projer>
Ox0dea: a better question would be how, and it is it in some way an anti pattern in ruby, because from what I read on stackoverflow it isn't used that often in the Ruby community
choke has quit [Ping timeout: 272 seconds]
BTRE has joined #ruby
celly has quit [Remote host closed the connection]
<Ox0dea>
projer: Well, consider Enumerable, for instance. It asks only that a subclass implement #each, and then it piggy-backs on that to provide a plethora of other functionality.
dlitvak_ has quit [Remote host closed the connection]