<heftig>
this works, but turns all keys into arrays
bionhart has joined #ruby
Mattix has quit [Ping timeout: 268 seconds]
bigmac has joined #ruby
<heftig>
if you never use arrays as keys, use [k,v] instead of [[k],v] and it won't do that
<milardovich>
Is there a way to print a hole array row without using a loop? for example, if I have an array like [n,m] and I want to print all the m rows of an specific n column
<heftig>
puts a.map { |row| row[7] }.join ", "
<heftig>
still a loop, but an internal one
jacobbednarz has joined #ruby
beilabs_ has joined #ruby
<heftig>
puts a.transpose[1].join ", "
<heftig>
transposes the whole matrix, which is probably more expensive
Hanmac has joined #ruby
jacobbednarz has quit [Read error: Connection reset by peer]
dEPy has quit [Remote host closed the connection]
vwoo has quit [Ping timeout: 252 seconds]
DomKM has joined #ruby
Hanmac1 has quit [Ping timeout: 256 seconds]
vwoo has joined #ruby
dankest has quit [Quit: Leaving...]
DrShoggoth has quit [Quit: Leaving]
mocfive has quit [Remote host closed the connection]
robscomputer_ has quit [Remote host closed the connection]
robscomputer has joined #ruby
jenrzzz has joined #ruby
codesoda has joined #ruby
GeissT has joined #ruby
timkohrumel has quit [Remote host closed the connection]
<milardovich>
heftig, thanks!
dmiller has joined #ruby
ntus1017 has joined #ruby
staafl has joined #ruby
chipotle_ has joined #ruby
instinkt has quit [Ping timeout: 276 seconds]
gildo has joined #ruby
codesoda has quit [Remote host closed the connection]
<milardovich>
Just another silly question xD: I want to work with binary numbers. I need an array of certain lenght to be full-filled with 0s or 1s
<heftig>
milardovich: those probabilities aren't normalized
<milardovich>
Mmm is there something wrong in my array? its values are randomly generated, but I don't see the problem
<milardovich>
heftig, what you mean? should I round the numbers?
<heftig>
if you use the float version of the code, the probabilities need to sum to 1
<milardovich>
Ohhh I see
<milardovich>
heftig, now it works perfectly
<milardovich>
Thank you very much! :D
srji has joined #ruby
icole has joined #ruby
jimg has quit [Remote host closed the connection]
synthetix has quit [Ping timeout: 245 seconds]
<robert_>
okay, so THIS is something I don't get- I try to .each() on a hash, I get nil:NilClass, if I .each_with_pair() on the same instance, I get a NoMethodError.
sam113101 has joined #ruby
<milardovich>
heftig, just one question more, why it gives me 0s when I use it more than one time inside a block?
<heftig>
huh?
<heftig>
milardovich: target = rand; has to be repeated every time
<milardovich>
Ohhh
<milardovich>
I see
<robert_>
banisterfiend: still here?
<banisterfiend>
sup
havenwood has joined #ruby
freerobby has joined #ruby
gsvolt has joined #ruby
<robert_>
I have an @instance of something that gives me either nil:NilClass or NoMethodError, depending on whether I .each or .each_with_pair (respectively) o.O
<banisterfiend>
.each_with_pair isn't a method
<banisterfiend>
robert_: you need to use more pry :)
<robert_>
.. oh. oops.
<robert_>
.each_pair
<robert_>
derp
<robert_>
yeah, I was using .each_pair
nettoweb has quit [Quit: nettoweb]
kasper has joined #ruby
deadalus has quit [Excess Flood]
srji has quit [Ping timeout: 248 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
deadalus has joined #ruby
bionhart has joined #ruby
dmiller has quit [Remote host closed the connection]
<banisterfiend>
robert_: why are you writing ruby code that looks like java anyway
<banisterfiend>
? :)
BSaboia has quit [Ping timeout: 276 seconds]
<banisterfiend>
robert_: also, why are you using hard tabs?
<banisterfiend>
i have no idea what's changed between those two without any kind of diff
<banisterfiend>
also it's 6am here, i need to sleep
<banisterfiend>
goodluck! :)
<robert_>
thanks, heh
<robert_>
night
zastern has quit [Remote host closed the connection]
lewix has joined #ruby
vwoo has quit [Quit: Computer has gone to sleep.]
mduvall has joined #ruby
Tawnii has quit [Ping timeout: 246 seconds]
postmodern has quit [Quit: Leaving]
blitz has joined #ruby
vlad_starkov has joined #ruby
osvico has quit []
jonahR has joined #ruby
falkoner has joined #ruby
johnrliv_ has joined #ruby
vlad_starkov has quit [Ping timeout: 248 seconds]
dmiller has joined #ruby
kil0byte has joined #ruby
johnrlive has quit [Read error: Operation timed out]
jesly has quit [Quit: Leaving.]
rupee has quit [Quit: Leaving]
jesly has joined #ruby
ssvo has quit [Ping timeout: 252 seconds]
Guga_ has quit [Quit: ~]
butblack has joined #ruby
DomKM has joined #ruby
jesly has quit [Client Quit]
ssvo has joined #ruby
jimg has joined #ruby
RORgasm has joined #ruby
dmiller has quit [Remote host closed the connection]
burlyscudd has joined #ruby
kasper has quit [Remote host closed the connection]
jim_r0x has quit [Remote host closed the connection]
RORgasm has quit [Ping timeout: 252 seconds]
burlyscudd has quit [Ping timeout: 264 seconds]
falkoner has left #ruby [#ruby]
jimg has quit [Ping timeout: 240 seconds]
<milardovich>
I have an array with 1s and 0s which I then use to convert it to decimal values. The array in fact is like [[0,0,0],[0,0,1],[0,1,0]]... and I would need to order it. How can I do that? the problem is that each 0 and 1 is an element of the array, I don't know if you understand what I mean
Emmanuel_Chanel has joined #ruby
johnrliv_ has quit [Remote host closed the connection]
sam113101 has quit [Quit: WeeChat 0.4.0]
yshh has quit [Remote host closed the connection]
sam113101 has joined #ruby
Levin_22 has quit [Quit: Levin_22]
luckyruby has joined #ruby
fomatin has quit [Quit: Computer has gone to sleep.]
Hanmac1 has joined #ruby
johnrlive has joined #ruby
banghouse has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 240 seconds]
larissa has quit [Quit: Leaving]
orien has quit [Quit: Computer has gone to sleep.]
OnyxDragoon has quit [Remote host closed the connection]
butblack has quit [Quit: butblack]
i8igmac has quit [Quit: Leaving]
teedex has joined #ruby
moshee has quit [Ping timeout: 276 seconds]
teedex_ has joined #ruby
jimg has joined #ruby
bionhart has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 260 seconds]
butblack has joined #ruby
spacebug_ has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
spacebug has quit [Read error: Connection reset by peer]
teedex has quit [Ping timeout: 252 seconds]
jimg has quit [Ping timeout: 245 seconds]
johnrliv_ has joined #ruby
devoldmx has joined #ruby
nari has quit [Ping timeout: 268 seconds]
bionhart has joined #ruby
jonahR has quit [Quit: jonahR]
fomatin has joined #ruby
<robert_>
I have an array of hashes; I want to sort by one of the hash keys, how best would I do this?
eldariof has joined #ruby
johnrlive has quit [Read error: Operation timed out]
butblack has quit [Quit: butblack]
Sherwyn has joined #ruby
srji has joined #ruby
ged has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
postmodern has joined #ruby
ged has joined #ruby
moshee has joined #ruby
jenrzzz has joined #ruby
Michae___ has joined #ruby
vlad_starkov has quit [Ping timeout: 246 seconds]
johnrliv_ has quit [Remote host closed the connection]
matthewalr has joined #ruby
macmartine has joined #ruby
kil0byte has quit [Remote host closed the connection]
Michae___ has quit [Ping timeout: 246 seconds]
JumpMast3r has quit [Quit: JumpMast3r]
<matthewalr>
Anyone on that's familiar with rbvmomi?
srji has quit [Ping timeout: 248 seconds]
havenwood has quit [Remote host closed the connection]
yacks has quit [Quit: Leaving]
burlyscudd has joined #ruby
bm34 has joined #ruby
amh345 has joined #ruby
<amh345>
hi guys. i'd like to check for a file every x seconds. everything I'm finding pertains to rails and poll for changes. anything in ruby?
<amh345>
maybe just a straight up timer?
<macmartine>
a loop with a sleep?
jaredrhine has quit [Read error: Operation timed out]
burlyscudd has quit [Ping timeout: 252 seconds]
jaredrhine has joined #ruby
nari has joined #ruby
bionhart has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
<amh345>
that could work. i guess i'd need a cron or something.
kasper has quit [Remote host closed the connection]
morf has joined #ruby
burlyscudd has joined #ruby
ferr has joined #ruby
gildo has joined #ruby
Guest___ has joined #ruby
burlyscudd has quit [Ping timeout: 248 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
kasper has joined #ruby
beilabs_ has joined #ruby
jinie_ is now known as jinie
LennyLinux has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
cascalheira has quit [Quit: Leaving...]
fomatin has joined #ruby
LennyLinux has joined #ruby
Proshot is now known as statarb3
jimg has joined #ruby
DestinyAwaits has quit [Read error: Connection reset by peer]
h8R has quit [Ping timeout: 276 seconds]
DestinyAwaits has joined #ruby
h8R has joined #ruby
DestinyAwaits has quit [Read error: Connection reset by peer]
DestinyAwaits has joined #ruby
danslo has joined #ruby
icole has joined #ruby
statarb3 has quit [Quit: Leaving]
w400z has joined #ruby
jimg has quit [Ping timeout: 264 seconds]
spider-mario has quit [Read error: Connection reset by peer]
w400z has quit [Client Quit]
dash_ has quit [Quit: Time to beer :)]
jbpros has joined #ruby
cj3kim has joined #ruby
nettoweb has joined #ruby
zorbash has joined #ruby
razi has joined #ruby
icole has quit [Ping timeout: 245 seconds]
LennyLinux has quit [Remote host closed the connection]
hadees has joined #ruby
Hanmac1 has joined #ruby
zorbash has quit [Client Quit]
emergion has joined #ruby
Hanmac has quit [Ping timeout: 245 seconds]
spider-mario has joined #ruby
LennyLinux has joined #ruby
F1skr has joined #ruby
nettoweb has quit [Ping timeout: 256 seconds]
DestinyAwaits has quit [Read error: Connection reset by peer]
DestinyAwaits has joined #ruby
echevemaster has quit [Ping timeout: 252 seconds]
Jackneill_ has quit [Quit: Leaving]
nettoweb has joined #ruby
Jackneill has joined #ruby
cj3kim has quit [Remote host closed the connection]
timonv has joined #ruby
spike|spiegel has joined #ruby
nettoweb has quit [Client Quit]
DestinyAwaits is now known as Guest33748
DestinyAwaits has joined #ruby
Guest33748 has quit [Ping timeout: 268 seconds]
h22 has joined #ruby
<h22>
Can I understand what lazy eval is, with ruby?
ARCADIVS has quit [Quit: WeeChat 0.3.8]
<Xeago>
h22: not sure if I understand the question, buy lazy evaluation is certainly possible in ruby
daniel_- has joined #ruby
<Xeago>
def expensive_task; @expensive_task ||= do_expensive_task; end
aqil has quit [Quit: Ухожу я от вас]
kofno has quit [Remote host closed the connection]
qrf has joined #ruby
<qrf>
Uhm did the gem install behaviour change?
<Xeago>
we call this differently in ruby though
<qrf>
Apparently root gem install no longer sets it up globally
<qrf>
What do I do to do that now? I need this gem for 20+ accounts
<h22>
Xeago: I was asking if lazy eval was simple enough in ruby that I'll understand it. I don't really know what lazy eval is.. just found many people mentioning it.
<h22>
Xeago: I think I understand now, Thank you :)
sepp2k has quit [Read error: Connection reset by peer]
sepp2k has joined #ruby
obs has quit [Quit: Konversation terminated!]
agjacome has joined #ruby
m_3 has quit [Remote host closed the connection]
atno has quit [Ping timeout: 276 seconds]
philcrissman_ has joined #ruby
cascalheira has joined #ruby
arya has quit [Ping timeout: 248 seconds]
vadelius has left #ruby ["Leaving"]
workmad3 has joined #ruby
nettoweb has joined #ruby
atno has joined #ruby
<Banistergalaxy>
H22 maybe you mean lazy enumerable?
arya has joined #ruby
johnrlive has joined #ruby
m_3 has joined #ruby
_Renegade has joined #ruby
nettoweb has quit [Ping timeout: 246 seconds]
<h22>
Banistergalaxy: No. I was looking for lazy eval. But I did come across the new Enumerable::lazy class, when googling for lazy eval.. I suppose it is new in 2.0, because I haven't seen it before.
<Banistergalaxy>
Yeah
sambao21 has joined #ruby
<Banistergalaxy>
Well that's a more meaningful realization of lazy evaluation than just ||=
fomatin has quit [Quit: Computer has gone to sleep.]
<h22>
Banistergalaxy: Can you direct me to a tut or something that shows how it is used for real?
workmad3 has quit [Read error: Operation timed out]
burlyscudd has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
hogeo_ has quit [Ping timeout: 252 seconds]
jinie is now known as jinie_
arietis has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Client Quit]
burlyscudd has quit [Ping timeout: 240 seconds]
Randomage has quit [Quit: Randomage]
blaxter has quit [Ping timeout: 245 seconds]
qrf has left #ruby [#ruby]
danslo has quit [Quit: danslo]
AndChat| has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
wallerdev has joined #ruby
jimg has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
dash_ has joined #ruby
icole has joined #ruby
RyanD has joined #ruby
arietis has joined #ruby
jimg has quit [Ping timeout: 260 seconds]
ntus1017 has joined #ruby
adkron has joined #ruby
emergion has joined #ruby
fomatin has joined #ruby
scrollback has quit [Remote host closed the connection]
arya has quit []
scrollback has joined #ruby
icole has quit [Ping timeout: 252 seconds]
aryaLovesJoel has joined #ruby
RORgasm has joined #ruby
nezumi has quit [Ping timeout: 245 seconds]
r0bgleeson has quit [Read error: Connection reset by peer]
Guest___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guedes has joined #ruby
Guedes has joined #ruby
r0bgleeson has joined #ruby
LanaDelRey has joined #ruby
RORgasm has quit [Ping timeout: 252 seconds]
Cyrus has joined #ruby
ChristianS has quit [Excess Flood]
h22 has left #ruby [#ruby]
ChristianS has joined #ruby
devoldmx3 has joined #ruby
cj3kim has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
visof has quit [Quit: Leaving]
cj3kim has quit [Remote host closed the connection]
thams has joined #ruby
allsystemsarego has quit [Quit: Leaving]
banisterfiend has joined #ruby
pskosinski has joined #ruby
bsaboia_ has joined #ruby
sailias has quit [Ping timeout: 240 seconds]
dcunit3d has quit [Ping timeout: 264 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
emergion has quit [Quit: Computer has gone to sleep.]
cj3kim has joined #ruby
blitzkev has joined #ruby
redgirl has quit [Quit: This computer has gone to sleep]
cj3kim has quit [Remote host closed the connection]
blitz has quit [Read error: Connection reset by peer]
aryaLovesJoel has quit [Ping timeout: 248 seconds]
akashj87__ has joined #ruby
denver has joined #ruby
aryaLovesJoel has joined #ruby
cj3kim has joined #ruby
akashj87_ has quit [Ping timeout: 246 seconds]
jonathanwallace has joined #ruby
anderson has joined #ruby
sailias has joined #ruby
Guest____ has joined #ruby
adkron has quit [Ping timeout: 260 seconds]
Mo0O has joined #ruby
Mattix has joined #ruby
LanaDelRey has quit [Quit: Leaving]
akashj87 has joined #ruby
akashj87__ has quit [Ping timeout: 245 seconds]
fomatin has quit [Quit: Computer has gone to sleep.]
<Mo0O>
hello, when I run `bundle install` it allways return me 'Make sure that `gem install <a_gem>` succeeds before bundling. is there a way to tell bundle install all required gems ?
<Morrolan>
That happens if installation of one of the required gems fails. `gem install gemname` should provide an error message which might help.
aryaLovesJoel has quit []
thams has quit [Quit: thams]
<Mo0O>
Morrolan: yes, I understand that, but is there a way to make it automaticly ?
<Morrolan>
Installation of the gem failed, Mo0O, what should it be doing automatically?
aryaLovesJoel has joined #ruby
<Morrolan>
Try to install and fail again? :)
freerobby has joined #ruby
jbpros has quit [Quit: jbpros]
<Mo0O>
if I install the gem with `gem install <a_gem>` it doesn't fail
<sevenseacat>
with the same gem version?
<Mo0O>
yes
<sevenseacat>
do you have an actual example?
banisterfiend has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
burlyscudd has quit [Ping timeout: 240 seconds]
casheew has joined #ruby
ellipse has joined #ruby
Michae___ has quit [Remote host closed the connection]
func_reload has joined #ruby
dash_ has quit [Quit: Time to beer :)]
texanos has joined #ruby
texanos has left #ruby [#ruby]
aryaLovesJoel has quit [Ping timeout: 245 seconds]
jesly has joined #ruby
razi has quit [Quit: Leaving.]
wallerdev has quit [Quit: wallerdev]
nfk has quit [Quit: yawn]
yashshah has joined #ruby
Xeago_ has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
homelinen has quit [Ping timeout: 252 seconds]
dangerousdave has joined #ruby
homelinen has joined #ruby
icole has joined #ruby
jetblack_ has quit [Quit: leaving]
jetblack has joined #ruby
Xeago_ has quit [Ping timeout: 245 seconds]
chipotle_ has joined #ruby
chipotle_ has quit [Excess Flood]
icole has quit [Ping timeout: 245 seconds]
digimer has joined #ruby
devoldmx has quit [Ping timeout: 276 seconds]
<digimer>
Hi all. I'm not a ruby dev in any way, but I have a problem with a ruby program that I think is a missing dependency, but I have no idea how to sort it out.
<digimer>
I've got this error; /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- rpam_ext (LoadError)
<digimer>
any tips of sorting out what gem is missing?
devoldmx has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
Dann1 has joined #ruby
LarsSmit has quit [Quit: Leaving.]
<ellipse>
How did you install the program?
<digimer>
fedora; yum install pcsd (program name)
<digimer>
it's a pre-release, so I was testing from a user-perspective
<ellipse>
Maybe rpam.
Apane has joined #ruby
* digimer
looks in the rep for something with that name in it...
<ellipse>
The package is broken in any case.
<digimer>
yup
<digimer>
I was hoping to figure out what was missing so that I can put in a more useful bugzilla entry
<digimer>
and continue testing after that
<digimer>
I don't see any package with 'rpam' in the name... perhaps I need to install it another way?
* digimer
appologises for being such a noob :)
wallerdev has joined #ruby
jetblack has quit [Remote host closed the connection]
<ellipse>
rpam is quite likely, since pcsd relates to PAM.
<digimer>
now I am trying to fix it so I can continue with testing. I don't want to lose the weekend and I doubt the author will address this until next week
<Xeago>
anyways, read mkmf.log
<digimer>
will do
<Xeago>
I've only once encountered these issues, and skew away from them since then
cj3kim has quit [Remote host closed the connection]
banghouse is now known as Guest40430
blaxter_ has joined #ruby
johnrlive has quit [Remote host closed the connection]
tommyvyo_ has joined #ruby
jesly has joined #ruby
tommyvyo has quit [Ping timeout: 276 seconds]
sayan has joined #ruby
johnrlive has joined #ruby
generalissimo has quit [Remote host closed the connection]
Dann1 has quit [Quit: GODDAMNIT]
ntus1017 has quit [Remote host closed the connection]
myappleguy has joined #ruby
jimg has quit [Ping timeout: 252 seconds]
tspike has quit [Ping timeout: 246 seconds]
wargasm has joined #ruby
dotemacs has joined #ruby
Faris13 has quit [Read error: Connection reset by peer]
dcunit3d has joined #ruby
johnrlive has quit [Remote host closed the connection]
DomKM has quit [Quit: Leaving.]
jesly has quit [Ping timeout: 252 seconds]
JimmyNeutron has quit [Quit: Leaving]
snearch has joined #ruby
elManu has joined #ruby
butblack has joined #ruby
bsaboia_ has quit [Ping timeout: 268 seconds]
platzhirsch1 has quit [Quit: Leaving.]
Destiny101 has joined #ruby
JohnBat26 has joined #ruby
jesly has joined #ruby
johnrlive has joined #ruby
jesly1 has joined #ruby
DestinyAwaits has quit [Ping timeout: 260 seconds]
cj3kim has joined #ruby
emmanuelux has joined #ruby
tonini has joined #ruby
cj3kim has quit [Remote host closed the connection]
Destiny101 has quit [Client Quit]
jesly has quit [Ping timeout: 240 seconds]
cj3kim has joined #ruby
cj3kim has quit [Remote host closed the connection]
jesly1 has quit [Ping timeout: 245 seconds]
codesoda has joined #ruby
jesly has joined #ruby
vadelius has joined #ruby
kasper_ has joined #ruby
kofno has joined #ruby
jesly1 has joined #ruby
icole has joined #ruby
<dotemacs>
Hi, would you be interested in a Ruby Monthly if it was done in style of Hacker Monthly with a yearly subscription? It would provide a list of articles, nicely laid out, collected in a digital edition either as PDF/mobi/epub. Good idea ?
cj3kim has joined #ruby
jesly has quit [Ping timeout: 256 seconds]
johnrlive has quit [Remote host closed the connection]
jesly1 has quit [Client Quit]
S0da has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<r0bgleeson>
jhonnyboy: sending a rocket to north korea
<jhonnyboy>
ty r0bgleeson
<dotemacs>
havenwood: yea, so thats why I figured that some people might be interested ?
lyanchih has joined #ruby
<dotemacs>
havenwood: so what do you think, would you be interested in something like this ?
<havenwood>
dotemacs: Yeah, I wish there was one.
jhonnyboy has left #ruby [#ruby]
kenneth has quit [Quit: kenneth]
pskosinski has quit [Quit: pskosinski]
butblack has left #ruby [#ruby]
<dotemacs>
havenwood: You know how Hacker Monthly operates, it collects the most popular articles from Hacker News and prints them, providing the links to the original articles too. I'm thinking of doing something like this for Ruby
<havenwood>
dotemacs: Would prolly be more appealing if you could offer unique content as well. Maybe interviews or sections where open source maintainers comment on what is happening with their projects.
<havenwood>
dotemacs: Print or online only?
viszu has joined #ruby
<dotemacs>
havenwood: good idea, at first it would be digital, then print too if there was interest
<havenwood>
dotemacs: I personally don't care about print.
LarsSmit has quit [Quit: Leaving.]
subbyyy has quit [Ping timeout: 252 seconds]
<havenwood>
dotemacs: If you go ahead with it, I think it is a really good idea to offer all back editions with a subscription. (Like RubyTapas or CodeSchool does.)
<dotemacs>
havenwood: yea, i don't see why not, that would be cool.
axsuul has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
axsuul has quit [Client Quit]
<dotemacs>
havenwood: but at first I think i'd rather collect people's blogs and try to publish those in one place. The reasoning? When you have paid writers the passion doesn't come through, it's just a step by step how to do something
<havenwood>
dotemacs: Also really nice to at least have an informal policy of free needs-based subscription if someone writes a postcard requesting it.
braoru has quit [Ping timeout: 245 seconds]
nettoweb has quit [Quit: nettoweb]
haxrbyte has quit [Remote host closed the connection]
<dotemacs>
havenwood: as in -> "i can't afford it, i'm a student/... but I'd really like to read it" ?
devoldmx has joined #ruby
<havenwood>
dotemacs: ya
tw1sted has joined #ruby
sepp2k has quit [Ping timeout: 268 seconds]
<dotemacs>
havenwood: cool idea :)
pyrac has joined #ruby
<havenwood>
dotemacs: Peter Cooper and Avdi etc do that. I think it is a nice aspect of the Ruby community.
Faris13 has joined #ruby
subbyyy_ has quit [Quit: none 0.3.9.2]
nettoweb has joined #ruby
<dotemacs>
havenwood: yea, I agree
gsvolt has quit [Ping timeout: 245 seconds]
cha1tanya has quit [Quit: Leaving]
kasper_ has quit [Remote host closed the connection]
akemrir has joined #ruby
<havenwood>
jhonn, oh he left
tacos1de has quit [Ping timeout: 240 seconds]
tonini has quit [Ping timeout: 248 seconds]
jacobw has quit [Ping timeout: 245 seconds]
emmanuelux has quit [Ping timeout: 256 seconds]
tacos1de has joined #ruby
<havenwood>
dotemacs: Also making some magazines or parts of magazines free is a nice way to convince people its worth paying for the rest. Like RubyTapas gives out Monday episodes for free.
<havenwood>
Teasers.
<havenwood>
<3 RubyTapas
tk_ has quit [Quit: ばいばい]
sayan has quit [Read error: Connection reset by peer]
<havenwood>
Heard Avdi got enough subscriptions to quit his day job.
emmanuelux has joined #ruby
emmanuelux has quit [Client Quit]
* ellipse
wants to start a Ruby magazine now.
arubin has joined #ruby
mikewintermute has quit [Quit: mikewintermute]
S1ivka has quit [Remote host closed the connection]
sam113101 has quit [Quit: WeeChat 0.4.0]
gildo has quit [Ping timeout: 246 seconds]
sam113101 has joined #ruby
anderson has quit [Ping timeout: 252 seconds]
nettoweb has quit [Quit: nettoweb]
burlyscudd has joined #ruby
ChristianS has quit [Excess Flood]
ChristianS has joined #ruby
tommyvyo_ has quit [Quit:]
greenarrow has quit [Read error: Connection reset by peer]
lewis has quit [Remote host closed the connection]
<r0bgleeson>
:D
johnrlive has joined #ruby
<r0bgleeson>
im sold
jimg has quit [Ping timeout: 268 seconds]
bsaboia_ has quit [Remote host closed the connection]
<ellipse>
Haha, I wonder how viable an idea this is.
RORgasm has joined #ruby
sideshowcoder has joined #ruby
lewis has joined #ruby
icole has quit [Ping timeout: 268 seconds]
lewis has quit [Remote host closed the connection]
<ellipse>
It is probably an issue that I have no idea how to do video editing.
huoxito has joined #ruby
johnrlive has quit [Ping timeout: 252 seconds]
rgrinberg has quit [Quit: WeeChat 0.4.1]
RORgasm has quit [Ping timeout: 252 seconds]
Vert has joined #ruby
JumpMast3r has quit [Quit: JumpMast3r]
codecop has joined #ruby
nettoweb has quit [Quit: nettoweb]
roadt has quit [Ping timeout: 256 seconds]
<ellipse>
Oh hey, who would be interested in a call-in show about Ruby problems?
_bart has joined #ruby
BizarreCake has quit [Ping timeout: 248 seconds]
sam113101 has quit [Quit: WeeChat 0.4.0]
<dotemacs>
хахах
<dotemacs>
or even hahaha
DomKM has joined #ruby
sam113101 has joined #ruby
<ellipse>
What language is that?
kil0byte has joined #ruby
<ellipse>
I've never seen xa for laughing before
<dotemacs>
ellipse: haha in cyrillic, this one just happens to be Serbian, but it'd work/spell out the same in any other language
<ellipse>
Ah, interesting.
<dotemacs>
h -> х, a -> а
workmad3 has joined #ruby
Spooner has joined #ruby
<dotemacs>
one thing I found out today, the more emoji you add to your pull request, the better the response
platzhirsch has joined #ruby
* ellipse
wants a graph.
<platzhirsch>
heftig: It's really nice that you responded to my question yesterday. Interestingly you gave me code to do this conversion, but I only meant a way to model the keys
<ellipse>
If the increase is unbounded, I am totally getting a backdoor in Linux. :)*10^20
<platzhirsch>
If you have a Hash { a : 5, b : { 7 }, c : [ { d : 3 }, { d : 5 } ] } and you were assigned to find a representations for certain keys, how would you do that? The representation would need to list all hash keys required to get to the value
<platzhirsch>
If the Hash would be flat, this would be easy. Just take the one key: a.
<apeiros>
that's not even valid, platzhirsch
sambao21 has joined #ruby
yacks has joined #ruby
<platzhirsch>
apeiros: sorry, the b should be b : { z : 3 } or something
<mhahn>
but i have that currently and it doesn't seem to work
<codesoda>
Mo0O: what sort of project is this?
johnrlive has joined #ruby
pootler__ has joined #ruby
pootler_1 has joined #ruby
jimg has quit [Ping timeout: 268 seconds]
<Mo0O>
codesoda: gollum, but I'm just an end user -as you can see-
<havenwood>
mhahn: So you want to `gem install gem_name_here` for a particular version of Ruby managed with rbenv?
<mhahn>
yea
icole has quit [Ping timeout: 246 seconds]
mikewintermute has joined #ruby
<yxhuvud>
mhahn: I suppose bundler isn't available?
johnrlive has quit [Ping timeout: 252 seconds]
miclen has joined #ruby
<Mo0O>
havenwood: thanks, that's working like a charm (^_^)
<mhahn>
i think i got it, thanks guys
mhahn has left #ruby [#ruby]
asgardBSD has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby
brennanMKE has joined #ruby
Astralum has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
Sou|cutter has joined #ruby
akashj87 has quit [Quit: Leaving]
whowantstolivefo has joined #ruby
obs has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
niklasb has quit [Ping timeout: 252 seconds]
freerobby has quit [Quit: Leaving.]
wroathe has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<wroathe>
I have an array of strings like this: ['one', 'three', 'six', 'three', 'three', 'two']. What would be the easiest way of getting the index of all matching strings in that array. For instance, if I wanted 'three' I'd get an array back that looks like [1, 3, 4]
<wroathe>
.index and .rindex just seem to return the index from the head or tail of the array respectively
<wroathe>
"How do you do this simple task?" "Here's six different ways."
<canton7>
inflammatory thing to say...
<wroathe>
:P
blaxter_ has quit [Quit: foo]
<wroathe>
Sorry, I've been switching between languages a lot lately. Ruby is by far the most difficult to come back to.
<canton7>
and all of them are better than PHP's single option...
<wroathe>
PHP isn't a language.
<ellipse>
Because obviously there is only one solution to every problem.
<canton7>
to be fair, python would probably have the same options, but using list comprehensions, and C#'s LINQ would provide the same options as given here
<havenwood>
wroathe: Another option: a.each_with_index.map { |e, i| i if e == 'three' }.compact
jenrzzz has quit [Ping timeout: 248 seconds]
<canton7>
map abuse! but clever
<havenwood>
canton7: :P
amh345 has quit [Quit: amh345]
JumpMast3r has joined #ruby
jenrzzz has joined #ruby
<canton7>
nothing special about ruby here - the options are "iterate the array and build a separate list", "combine elements with indexes and filter them", or "iterate indexes and lookup back into the array to get the element, then filter". Doesn't matter what language you're using
tspike has joined #ruby
<havenwood>
wroathe: Ruby making these options all expressible is a good thing, imho.
hogeo_ has joined #ruby
<canton7>
and all of the ways ruby has of expressing these options are clear imo
<havenwood>
map.with_index is nicer than each_with_index.map I guess
<canton7>
mm, I prefer having map on the end, as that's where I look to see what's happening to the block
<havenwood>
canton7: good piont
<havenwood>
point*
Jackneill has quit [Ping timeout: 248 seconds]
<r0bgleeson>
why not use select?
<r0bgleeson>
oh you want the index
<wroathe>
I ended up with this: row_order.map.with_index { |e, i| i if e == 'table' }.compact
<wroathe>
So thanks for the help :)
hogeo has quit [Ping timeout: 260 seconds]
tonini has joined #ruby
cj3kim has joined #ruby
radic__ is now known as radic
TheFuzzball has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
cj3kim has quit [Remote host closed the connection]
LennyLinux has quit [Remote host closed the connection]
horofox_ has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jimg has joined #ruby
Hanmac has quit [Ping timeout: 268 seconds]
cj3kim has quit [Remote host closed the connection]
icole has joined #ruby
anderson has joined #ruby
jbpros has joined #ruby
jimg has quit [Ping timeout: 260 seconds]
butblack has left #ruby [#ruby]
timkohrumel has joined #ruby
RORgasm has joined #ruby
tonini has joined #ruby
johnrlive has joined #ruby
timkohrumel has quit [Ping timeout: 252 seconds]
johnrlive has quit [Ping timeout: 252 seconds]
RORgasm has quit [Ping timeout: 252 seconds]
tonini has quit [Quit: leaving]
tonini has joined #ruby
kayloos has joined #ruby
milardovich has joined #ruby
pootler__ has joined #ruby
pootler_1 has joined #ruby
banisterfiend has joined #ruby
mikewintermute has quit [Quit: mikewintermute]
maroloccio has joined #ruby
lkba has joined #ruby
jbpros has quit [Quit: jbpros]
freerobby has quit [Quit: Leaving.]
icole has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
mduvall has joined #ruby
philcrissman_ has quit [Remote host closed the connection]
freerobby has joined #ruby
joesavage has joined #ruby
<joesavage>
I'm writing a "pack"ed array of bytes to a file in Ruby, but '3's seem to appear EVERYWHERE in the result file. At the second byte in my array, I confirm before writing the value '1', for example, but in the final file this becomes the hex '31' for no seemingly logical reason. I'm using the following to write the file: http://pastebin.com/vXRJjci8
Apocalypse has quit [Read error: Operation timed out]
denver has quit [Remote host closed the connection]
snearch has joined #ruby
aedornm has quit [Ping timeout: 240 seconds]
burlyscudd has joined #ruby
ellipse has quit [Quit: Bye]
joesavage has quit [Quit: Page closed]
pcarrier_ has quit [Ping timeout: 240 seconds]
burlyscudd has quit [Ping timeout: 246 seconds]
adambeynon has joined #ruby
Dummies_freelanc has quit [Ping timeout: 248 seconds]
<joshu>
anyone up for a quick brainstorming session regarding how to deal with user presence/ status/ logged or logged out api endpoint
brennanMKE has quit [Remote host closed the connection]
agent_white has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
brennanMKE has joined #ruby
braoru has quit [Ping timeout: 245 seconds]
<pontiki>
joshu: sure
<joshu>
pontiki cool
daniel_- has quit [Quit: WeeChat 0.4.1]
<joshu>
basically my app needs to store the status of 5 users. Who's online, offline type of thing. I'm thinking about whether I should just have a JSON array something like this https://gist.github.com/anonymous/3c98ae7bcf5c713997de
<joshu>
if no one is available then the array doesn't exist or is empty.
<joshu>
Not sure. What do you think?
<pontiki>
seems exploitable...
<joshu>
I use this info to either transfer calls if anyone is available or when no one is I send the call to voicemail. That's really the purpose of this "endpoint"
brennanMKE has quit [Ping timeout: 245 seconds]
nomenkun has joined #ruby
codecop has quit [Remote host closed the connection]
aedornm has joined #ruby
<pontiki>
nod; it seems workable on the surface
<pontiki>
it's basically to try to find someone who can take a call ("joe is in")
<pontiki>
?
<joshu>
yes correct.
<pontiki>
with proper safeguards to make sure the api isn't exploitable, i'd say that would be okay
<joshu>
I'll use HTTPS and basic http auth
<pontiki>
nodnod
<pontiki>
nothing is ever guaranteed, of course, but that sounds reasonable
<joshu>
yeah good? I'm in totally unfamiliar territory here ;)
<pontiki>
does the calling app have access to the user data?
<pontiki>
if so, i'd just return UUIDs
pcarrier_ has joined #ruby
jesly has joined #ruby
<pontiki>
still with auth
nomenkun has quit [Ping timeout: 260 seconds]
<pontiki>
and ssl
<joshu>
the calling app will not query this data only set his/ her presence or delete his/ her presence