baweaver has quit [Remote host closed the connection]
simi has quit [Ping timeout: 240 seconds]
JEG2 has quit [Quit: Connection closed for inactivity]
shakes has joined #ruby-lang
car has joined #ruby-lang
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
amystephen has joined #ruby-lang
duderonomy has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: zzz]
charliesome has joined #ruby-lang
car has quit [Ping timeout: 265 seconds]
ogpastaling has joined #ruby-lang
rcvalle has joined #ruby-lang
bungoman has joined #ruby-lang
amystephen has quit [Quit: amystephen]
amystephen has joined #ruby-lang
car has joined #ruby-lang
hahuang65 has quit [Ping timeout: 252 seconds]
dvlwrk has joined #ruby-lang
tmi has quit [Ping timeout: 256 seconds]
rcvalle has quit [Quit: rcvalle]
jgpawletko_away has quit [Quit: jgpawletko_away]
jgpawletko has joined #ruby-lang
rcvalle has joined #ruby-lang
rcvalle has quit [Client Quit]
atomical has joined #ruby-lang
nofxx has joined #ruby-lang
shinnya has quit [Ping timeout: 272 seconds]
kfpratt has joined #ruby-lang
bungoman has quit [Remote host closed the connection]
aaeron has quit [Quit: aaeron]
fujimura has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
car has quit [Quit: Leaving]
amystephen has quit [Quit: amystephen]
yfeldblum has quit [Ping timeout: 256 seconds]
b_hoffman has joined #ruby-lang
Megamos has quit [Ping timeout: 240 seconds]
caseypatrickdris has quit [Remote host closed the connection]
nertzy has joined #ruby-lang
hahuang65 has joined #ruby-lang
jgpawletko has quit [Remote host closed the connection]
yfeldblu_ has quit [Remote host closed the connection]
jimr has joined #ruby-lang
yfeldblum has joined #ruby-lang
<jimr>
I am trying to grab Twitter trends as in this code snippet https://gist.github.com/anonymous/4fc2f031ae68033787d7 It prints out the top 10 trends but if I only want to print say the 5th one in the array how do I do that? ht something like
cornerma1 has joined #ruby-lang
centrx has joined #ruby-lang
<jimr>
I thought something like " puts canada[5].name " would work but doesn't . I am a newbie to Ruby.
cornerman has quit [Ping timeout: 256 seconds]
cornerma1 is now known as cornerman
mkosaki has quit [Ping timeout: 256 seconds]
mkosaki has joined #ruby-lang
nertzy has quit [Quit: This computer has gone to sleep]
billy_ran_away has quit [Ping timeout: 264 seconds]
aaeron has joined #ruby-lang
musl_ has joined #ruby-lang
ljarvis_ has quit [Ping timeout: 264 seconds]
thang has quit [Ping timeout: 264 seconds]
ljarvis has joined #ruby-lang
thang has joined #ruby-lang
musl has quit [Ping timeout: 264 seconds]
bkutil has quit [Ping timeout: 264 seconds]
bkutil has joined #ruby-lang
billy_ran_away has joined #ruby-lang
kfpratt has quit [Ping timeout: 264 seconds]
bungoman has joined #ruby-lang
symm- has quit [Ping timeout: 256 seconds]
fedexo has joined #ruby-lang
djbkd_ has joined #ruby-lang
joaomdmoura has joined #ruby-lang
rawrmonstar has joined #ruby-lang
ogpastaling has quit [Remote host closed the connection]
aaeron has quit [Ping timeout: 264 seconds]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bungoman has quit [Remote host closed the connection]
gix has quit [Ping timeout: 256 seconds]
tmi has joined #ruby-lang
auzty has joined #ruby-lang
bungoman has joined #ruby-lang
gix has joined #ruby-lang
<nofxx>
jimr, that should work
aaeron has joined #ruby-lang
shakes has quit [Quit: Leaving]
dellavg_ has joined #ruby-lang
alestuber has joined #ruby-lang
alestuber has quit [Ping timeout: 264 seconds]
dvlwrk has quit [Quit: Leaving]
kfpratt has joined #ruby-lang
Megamos has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby-lang
kfpratt has quit [Ping timeout: 276 seconds]
<jimr>
@nofxx thanks. I discovered that I have to write it as "puts canada.to_a[5].name "
bungoman has quit [Remote host closed the connection]
aaeron has quit [Ping timeout: 246 seconds]
djbkd_ has quit []
skade has joined #ruby-lang
mikecmpbll has quit [Quit: ciao.]
bb010g has quit [Quit: Connection closed for inactivity]
aaeron has joined #ruby-lang
dellavg_ has quit [Ping timeout: 264 seconds]
crdpink2 has joined #ruby-lang
crdpink has quit [Ping timeout: 256 seconds]
aaeron has quit [Ping timeout: 246 seconds]
michaeldeol has joined #ruby-lang
mcclurmc has quit [Remote host closed the connection]
bb010g has joined #ruby-lang
mcclurmc_ has joined #ruby-lang
amclain has quit [Quit: Leaving]
rippa has joined #ruby-lang
iamninja has quit [Read error: Connection reset by peer]
Iskarlar has joined #ruby-lang
mcclurmc_ has quit [Remote host closed the connection]
iamninja has joined #ruby-lang
niemcu has joined #ruby-lang
duderonomy has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
ur5us has quit [Remote host closed the connection]
Megamos has quit [Remote host closed the connection]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
allomov_ has quit [Remote host closed the connection]
pwnz0r has joined #ruby-lang
solars has joined #ruby-lang
emptyfla1k has joined #ruby-lang
emptyfla1k has quit [Client Quit]
car has joined #ruby-lang
<nofxx>
jimr, hm... you can use IRB to play, also checkout 'pry' to have an irb whenever you need
perry has quit [Ping timeout: 264 seconds]
iamninja has quit [Read error: Connection reset by peer]
x44x45x41x4E has joined #ruby-lang
hahuang65 has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 265 seconds]
perry has joined #ruby-lang
kfpratt has joined #ruby-lang
Musashi007 has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 255 seconds]
iamninja has joined #ruby-lang
car has quit [Ping timeout: 264 seconds]
centrx has quit [Quit: Shutting down, Please wait...]
futilegames has joined #ruby-lang
kfpratt has quit [Ping timeout: 276 seconds]
futilegames has quit [Client Quit]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
VinnyBoy has quit [Read error: Connection reset by peer]
Voker57 has quit [Read error: Connection reset by peer]
ur5us has quit [Remote host closed the connection]
Forgetful_Lion has quit [Remote host closed the connection]
j4cknewt has joined #ruby-lang
car has joined #ruby-lang
bb010g has quit [Quit: Connection closed for inactivity]
<yorickpeterse>
morning
AlxAltea has quit [Ping timeout: 272 seconds]
dorei has joined #ruby-lang
rikkipitt has quit [Quit: Leaving...]
kr3ssh has joined #ruby-lang
toretore has joined #ruby-lang
anaiden has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
futilegames has quit [Quit: futilegames]
fedexo has quit [Read error: Connection reset by peer]
car has quit [Ping timeout: 255 seconds]
leat has joined #ruby-lang
joaomdmoura has quit [Remote host closed the connection]
futilegames has joined #ruby-lang
car has joined #ruby-lang
skade has joined #ruby-lang
hahuang65 has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
hahuang65 has quit [Ping timeout: 240 seconds]
skade has quit [Quit: Computer has gone to sleep.]
datanoise has joined #ruby-lang
skade has joined #ruby-lang
car has quit [Quit: Leaving]
ec-not-irccloud has joined #ruby-lang
arBmind has joined #ruby-lang
ur5us has joined #ruby-lang
x44x45x41x4E has joined #ruby-lang
ec-not-irccloud has quit [Client Quit]
ec-not-irccloud has joined #ruby-lang
dhjondoh has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jdeen has joined #ruby-lang
<jdeen>
Hi there. I am on a projet that uses `gettext` for translations in a Sinatra project. It uses _('blah') for translations. While it works in routes and helpers, the _() fails with 'undefined method _' in other Ruby classes. How can I introduce _() to them.
AlexAltea has joined #ruby-lang
<maloik>
not entirely aware of how it works, but did you include a gem in the project?
<jdeen>
maloik: Yes it was, aparantly you need to `include GetText` in every class you need to use it which makes sense. Not sure if there is a better way, but thats what I found out.
<jdeen>
thanks for the reply
<toretore>
there is probably a GetText.translate or equivalent method that you can use
dhjondoh has joined #ruby-lang
<maloik>
that's what I was going to say, you most likely need to include some kind of helper
<maloik>
although from what I can tell sinatra doesn't include this out of the box
<maloik>
(which is why I asked, so I could check how the gem in question does it)
ec-not-irccloud is now known as ec
ec is now known as ec\
<jdeen>
The Sinatra app didn't have `include GetText` when I did a grep. So I thought it must be working like magic but in classes it didn't. I was reading readme file and it seem we need to `include GetText` and with it use `_()` which seems to be the only way.
skade has quit [Quit: Computer has gone to sleep.]
<yorickpeterse>
same goes for '\n' vs "\n"
<mistnim>
thanks yorickpeterse
Yami has joined #ruby-lang
<Yami>
Hi!
cryo28 has joined #ruby-lang
allomov has joined #ruby-lang
kr3ssh has joined #ruby-lang
zendrix has joined #ruby-lang
bertocode has joined #ruby-lang
<Yami>
Can somebody tell me on which class is the '+=' method declared?
<Mon_Ouie>
There's no += method
<|jemc|>
Yami: it's not, it's just the `+` operator followed by reassignment
<Mon_Ouie>
It's a syntax sugar for a = a + b
<|jemc|>
it's syntax sugar rather than a method
<|jemc|>
yeah
<Yami>
Ok it's just a sugar.
allomov has quit [Ping timeout: 264 seconds]
<Yami>
I was wondering since nearly everything is a method here. :p
<Yami>
Thx.
zendrix has quit [Ping timeout: 255 seconds]
<Mon_Ouie>
It couldn't be a method because methods can't change the object referenced by a variable, they can only modify the state of objects. Not to mention, as a method, calling it like '3 += 4' wouldn't really make any sense.
<yorickpeterse>
technically += could be a method if fixnums weren't immutable
<Yami>
Mon_Ouie: Well I don't think that 4.+=(3) could be inconcevable
<Yami>
Oh yeah, if Fixnum weren't immutable that is.
<Mon_Ouie>
But that would break a lot of existing code, though --- anything that assumes that after 'y = 3; x = y; x+= 3', y is still equal to 3.
<mietki>
I was trying to write simple script in ruby but it seems like I don't understand documentation correctly
b_hoffman has quit [Quit: b_hoffman]
<mietki>
or maybe something wrong is with module I use, but perhaps you could tell me whether the syntax is correct
<Mon_Ouie>
Syntax is correct, the error is an ArgumentError raised by the method that you're calling (I'm not sure if by "type" in that error message they refer to the class of the object being used as credentials)
duderonomy has joined #ruby-lang
ybathia has joined #ruby-lang
nofxx has joined #ruby-lang
Iskarlar has joined #ruby-lang
solars has quit [Ping timeout: 272 seconds]
<mietki>
Mon_Ouie: thanks a lot
<mietki>
so that stands for creds being not proper object?
<mietki>
because in documentation I can read that :credentials is "The credentials to use for the clone operation. Can be either an instance of one of the Rugged::Credentials types, or a proc returning one of the former. "
zendrix has quit [Remote host closed the connection]
<Senjai>
The best part about linux: Use whatever package manager you want.
<yorickpeterse>
try explaining pacman to anybody that doesn't have a doctoral decree in stabbing themselves
<Senjai>
whodafuqcares
<yorickpeterse>
(and I say that after using pacman for about 4 years)
<pipework>
I'm waiting for a package manager that lets me decide the locality of the installed packages. From system-wide to shared between some things, all the way to just for this one thing.
<Senjai>
yorickpeterse: I dont understand the issues
<yorickpeterse>
"ok so I want to just sync my repo list"
<yorickpeterse>
"in apt I just run apt-cache update"
<nofxx>
yorickpeterse, -Syu instead of 'upgrade' ? hehe kinda true... but anyway just that to remember
<pipework>
Until then, slackware stands far and above the rest, imo.
<yorickpeterse>
"Pacman? sudo pacman -Syy"
<Senjai>
apt-get update**
zendrix has joined #ruby-lang
fujimura has joined #ruby-lang
iamse7en has joined #ruby-lang
<pipework>
I'm a fan of tce for now.
<pipework>
It's small and simple and barely pretends to be a package management system.
symm- has joined #ruby-lang
<nofxx>
pipework, kinda brew for linux? recipes written in ruby looks nice, can't deny =D
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yorickpeterse>
I like the idea of the nix package manager
<pipework>
nofxx: Whale, I'd like packaging to be simple. The choice between pre-compiled and source-built and the ability to choose locality all at package install time would be great.
<bougyman>
yorickpeterse: taken a look at xbps yet?
<yorickpeterse>
but clearly the future is statically linked binaries
<yorickpeterse>
bougyman: No, never heard of it
<bougyman>
we're working on xbps2 now, which will allow nix-like packages in conjunction with 'system' packages.
<bougyman>
yorickpeterse: if you're frustrated with archlinux as I became, it's an easy transition.
alestuber has joined #ruby-lang
<bougyman>
and it takes care of two of the biggest probs I had with arch outside of the package policies.. that is it doesn't wipe out old kernels implicitly.
<bougyman>
instead there's a vkpurge tool which allows you to control when to nuke an old kernel.
yfeldblum has quit [Ping timeout: 265 seconds]
<bougyman>
if you have some time to give it a go on a vm, i'd love to hear your feedback. voidlinux.eu has the details.
fujimura has quit [Ping timeout: 252 seconds]
<yorickpeterse>
Overall Arch itself isn't really an issue for me, I learned to be careful with updates after I fucked libpng and libc on a Monday morning during a work week
<bougyman>
and we're in #xbps for support.
<bougyman>
yorickpeterse: yep, same beefs, here.
<yorickpeterse>
bougyman: hm interesting
Voker57 has quit [Read error: Connection reset by peer]
<bougyman>
nicest plus out of the bag is that it supports a lot more archs.
<bougyman>
i've got it running on armv6, armv6, arm64, amd64 and amd64_musl, atm.
<yorickpeterse>
bougyman: so what were your main frustrations with Arch? I remember you being a pretty hardcore Arch person, going as far as even running it on a bunch of servers
<bougyman>
er armv6 and v7
<bougyman>
yorickpeterse: yep, I ran it on phone switches for quite some time.
<bougyman>
until the glibc debacle.
<nofxx>
pipework, pacman has all that, for binary or compile your self use abs, for location just cp the result where you want
dented42 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bougyman>
that followed by the systemd mess finally got me looking around.
<pipework>
nofxx: So does make.
<pipework>
and configuration systems.
<bougyman>
when I found void I was sold pretty fast by the dev team and simplicity.
<yorickpeterse>
What does void use for init?
<bougyman>
runit
<bougyman>
which is my fave, anyway.
<bougyman>
that helped my decision a lot.
<yorickpeterse>
heh
<bougyman>
I ran runit on arch with no problem, too.
dented42 has joined #ruby-lang
<bougyman>
but I had to maintain my own init.
<yorickpeterse>
Ran runit for a while as well, I always had trouble kill -9'ing it those few times I had to
dagda1 has joined #ruby-lang
<yorickpeterse>
which I guess is a good thing
<bougyman>
now i'm just one of many contributors to runit-void.
zendrix has quit [Remote host closed the connection]
<surrounder>
interesting, haven't heard of that distro before
<yorickpeterse>
The two things I like of systemd are the CLI and the service config files
<bougyman>
it's not super young.
zendrix has joined #ruby-lang
<bougyman>
just stayed kind of under the radar.
<bougyman>
I yell about it all the time, though, cause i'm a bigmouth.
<yorickpeterse>
Granted, if all distros would've settled on a pattern that could've been applied to sysvinit too
<yorickpeterse>
but noo, every distro is a special snowflake that does things differently
<bougyman>
see runit doesn't justa void that cross-distro, but cross os.
<bougyman>
my service files are the same on void, arch, netbsd, freebsd, mac, openbsd, *.
<bougyman>
and even cross-init.
<yorickpeterse>
I take it that with void not using systemd it still uses consolekit/udev/etc?
<yorickpeterse>
No, but I like the AUR for its "too lazy to make proper package so fukit PKGBUILD" attitude
<bougyman>
and nothing gets in without passing our buildbot, even by us.
<yorickpeterse>
lots of stuff on there you'd normally have to compile/configure yourself
<bougyman>
yorickpeterse: oh xbps-src allows you do do that locally.
<bougyman>
even automatically makes a local pkg repo for you.
duderonomy has quit [Ping timeout: 272 seconds]
<yorickpeterse>
Granted I think I cleaned up most AUR packages I had installed
yfeldblum has joined #ruby-lang
<bougyman>
xbps-src make makepkg look like a joke, really
rbowlby has joined #ruby-lang
<bougyman>
by default it builds in a clean chroot (using the chroot of your choice... uunshare, proot, lots of others but with a sane default) and publishes the built packages to a local repo.
baweaver has joined #ruby-lang
<bougyman>
if you're in a feature branch (say feature/somepackage), it even makes a local repo just for that feature branch.
sepp2k has quit [Quit: Leaving.]
<yorickpeterse>
What I Mostly meant was that with the AUR being pretty big you'd rarely have to do this yourself, you'd just install some pre-built thing from AUR
ruby-lang363 has joined #ruby-lang
<yorickpeterse>
(as in, pre-built PKGBUILD)
<bougyman>
ah, right. I didn't have fun with AUR stuff that I didn't write myself, overall.
<bougyman>
as a matter of fact, it was quite un-fun
<ruby-lang363>
wadup?
hal_9000_ has joined #ruby-lang
<bougyman>
all that said, converting an aarch PKGBUILD to a void package template is quite a straightforward process.
<bougyman>
this similarity is why some people think void is a fork of arch (it's not).
postmodern has joined #ruby-lang
<hal_9000_>
hi bougyman, long time no see
zendrix has quit [Remote host closed the connection]
<womble>
So you put something like `puts uri.inspect` after the line `uri = config.url` and it printed a string that looks like the URL you want to use?