kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jds has joined #ruby
fermion has quit [Quit: Computer has gone to sleep.]
subbyyy has joined #ruby
tylersmith has joined #ruby
timkohrumel has joined #ruby
krainboltgreene has joined #ruby
statarb3 has quit [Quit: Leaving]
tylersmith has quit [Remote host closed the connection]
kiry has quit []
<dankest>
jkline: I use shoulda for the contexts
timkohrumel has quit [Ping timeout: 276 seconds]
burlyscudd has joined #ruby
Hanmac2 has quit [Read error: Connection reset by peer]
Hanmac has joined #ruby
jkline has quit [Quit: jkline]
jasonkuhrt has joined #ruby
huoxito has joined #ruby
GeissT has joined #ruby
incorvia has quit [Remote host closed the connection]
arubin has joined #ruby
devoldmx3 has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
cantonic has quit [Quit: cantonic]
Aaaarg has joined #ruby
yshh has joined #ruby
iamjarvo has joined #ruby
staafl_alt has quit [Ping timeout: 268 seconds]
milardovich has joined #ruby
bradhe has joined #ruby
redgirl has joined #ruby
EPIK has joined #ruby
marr has quit [Ping timeout: 256 seconds]
jkline has joined #ruby
icole has quit [Remote host closed the connection]
krainboltgreene has quit [Ping timeout: 276 seconds]
<milardovich>
Hello guys, I have a binary number, let's suppose 101, but I need to work always in a string of 10 element. For example, if I have 101 I should have 0000000101, or if I have 1 I should get 0000000001
<milardovich>
How can I do that?
gildo has quit [Ping timeout: 268 seconds]
robscomputer has joined #ruby
rafb3 has joined #ruby
<popl>
hang on, I will see milardovich
<milardovich>
popl, thank you
<popl>
sprintf
<mnemon>
sprintf '%010d', 1
<popl>
sprintf "%08b", 2 # 00000010
djbkd has quit [Quit: Leaving]
Inside has quit [Ping timeout: 256 seconds]
<mnemon>
ah, true
lyanchih has joined #ruby
pw3 has quit [Ping timeout: 250 seconds]
ssvo has quit [Ping timeout: 264 seconds]
timkohrumel has joined #ruby
jimg has quit [Remote host closed the connection]
rafb3_ has joined #ruby
gr4yscale has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
<popl>
That may not be the idiomatic way in ruby to do it.
rafb3 has quit [Ping timeout: 264 seconds]
heftig has quit [Ping timeout: 245 seconds]
<popl>
Does ruby have formats like python?
robscomputer has quit [Ping timeout: 276 seconds]
timkohrumel has quit [Remote host closed the connection]
blitz has quit [Quit: This computer has gone to sleep]
<popl>
yeah thanks mnemon
jackal_af has joined #ruby
<milardovich>
popl, Oh, you mean there is a "rubier" way to do that?
buzzybron has joined #ruby
harrymoreno has joined #ruby
<jackal_af>
anyone got a moment to help with a n00b ruby (and Kafka) question?
Aaaarg has quit [Quit: Aaaarg]
<milardovich>
popl, I don't need to print it but use it as a string, so I think sprintf won't work :-/
nettoweb has quit [Quit: nettoweb]
heftig has joined #ruby
chrishough has quit [Quit: chrishough]
<popl>
sprintf returns a string
brennanMKE has joined #ruby
<mnemon>
jackal_af: might get answers if you just ask the question :>
<milardovich>
popl, yes, but doesn't it print it?
Aaaarg has joined #ruby
jonahR has quit [Quit: jonahR]
<popl>
printf should print it
<milardovich>
Oh I see
<milardovich>
Thanks :)
<popl>
no worries
sarkis has quit [Ping timeout: 268 seconds]
<jackal_af>
what is the difference between kafka and kafka-rb gem?
thams has joined #ruby
<milardovich>
popl, it still doesn't work with %08b
<milardovich>
I tried with 101 and I get 01100101
<popl>
oh shoot, I thought you were starting with base 10
_theriffer_ has joined #ruby
<milardovich>
popl, no, sorry, maybe I expressed myself in the wrong way, I only need to fill with 0s the rest of the numbers until I get 10
<mnemon>
jackal_af: different authors and apparently different uses ... kafka-rb is for http://kafka.apache.org/ and kafka is "kafka is a tiny gem which allows you to convert standard svn repositories to git."
sarkis has joined #ruby
brennanMKE has quit [Ping timeout: 248 seconds]
jkline has quit [Quit: jkline]
<popl>
milardovich: no, you said it right. I just misread. :) I don't know how to do this in ruby. How I would do it in general would be to treat your binary number as a string (since it needs no conversion) then just prepend however many zeroes you need to
Voodoofish430 has quit [Quit: Leaving.]
<jackal_af>
ah…thanks. I'm working through an example that's using the Kafka (message queue service) but requires 'kafka'. Looks like an author fail.
sailias has joined #ruby
jimg has joined #ruby
<milardovich>
popl, I see, I thought it in the same way, but I was so lazy to hand-code a function for doing that
<milardovich>
And I thought there would be a "built-in" way to do that
fomatin has quit [Quit: Computer has gone to sleep.]
ninegrid has quit [Ping timeout: 240 seconds]
richiebkr has joined #ruby
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
iamjarvo has joined #ruby
jimg has joined #ruby
tylersmith has joined #ruby
ninegrid has joined #ruby
burlyscudd has quit [Quit: Leaving.]
postmodern has quit [Ping timeout: 240 seconds]
martxel has quit [Ping timeout: 264 seconds]
bradhe has quit [Ping timeout: 268 seconds]
Hanmac2 has joined #ruby
poincare101 has quit [Quit: Leaving.]
bradhe has joined #ruby
tylersmith has quit [Ping timeout: 264 seconds]
Hanmac has quit [Ping timeout: 252 seconds]
radic_ has joined #ruby
philcrissman_ has joined #ruby
sonne has quit [Ping timeout: 264 seconds]
jackal_af1 has joined #ruby
jackal_af has quit [Read error: Operation timed out]
radic has quit [Ping timeout: 260 seconds]
jimg has quit [Remote host closed the connection]
jds has quit [Ping timeout: 246 seconds]
fomatin has joined #ruby
maycon has joined #ruby
maycon has joined #ruby
maycon has quit [Changing host]
mocfive has quit [Remote host closed the connection]
_Renegade has quit [Quit: _Renegade]
falkoner has quit [Quit: Leaving.]
rafb3_ has quit [Remote host closed the connection]
iamjarvo1 has joined #ruby
icole has joined #ruby
mocfive has joined #ruby
bradhe has quit [Remote host closed the connection]
freestyl3r has joined #ruby
pitzips has joined #ruby
_theriffer_ has joined #ruby
tkuchiki_ has joined #ruby
<freestyl3r>
Hello. i have a good grasp in C language and i'm looking to learn some ruby now. Can anyone recommend me a book that will quicly introduce me to ruby?
<freestyl3r>
i had a look at the "pickaxe" book but i feel 900 pages is too much to go through. i want something quicker
tkuchiki has quit [Read error: Connection reset by peer]
iamjarvo has quit [Ping timeout: 264 seconds]
philcrissman_ has quit [Remote host closed the connection]
Apane has quit [Ping timeout: 276 seconds]
braincrash has joined #ruby
braincra- has quit [Read error: Operation timed out]
icole has quit [Ping timeout: 264 seconds]
carlyle has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
kadoo has quit [Ping timeout: 246 seconds]
postmodern has joined #ruby
Oddnoun_ has joined #ruby
<freestyl3r>
but if you had to recommend an intermediate book?
Apane has joined #ruby
<L8D>
Sorry...Ruby has been changing so fast it would be hard to make a book be up to date.
nettoweb has joined #ruby
Oddnoun has quit [Ping timeout: 256 seconds]
<L8D>
I haven't used any actual 'books' on ruby
Oddnoun_ is now known as Oddnoun
kokobaby has joined #ruby
havenwood has joined #ruby
Oddnoun_ has joined #ruby
mduvall has joined #ruby
digitalcake has joined #ruby
<digitalcake>
what is the best way to make integers human readable such as turning 1000 -> "1,000"
Oddnoun has quit [Ping timeout: 240 seconds]
Oddnoun_ is now known as Oddnoun
* L8D
is working on that
milardovich has quit [Quit: Leaving]
digitalcake has quit [Client Quit]
digitalcake1 has joined #ruby
gazarsgo has quit [Quit: gazarsgo]
rupee has quit [Quit: Leaving]
Dekade has quit [Read error: Connection reset by peer]
jds has joined #ruby
jasonkuhrt has joined #ruby
kadoo has joined #ruby
mikepack has joined #ruby
jimg has joined #ruby
freestyl3r has left #ruby ["WeeChat 0.4.1"]
<popl>
digitalcake1: are you using rails?
mocfive has quit [Remote host closed the connection]
<popl>
there's a rails function to do it but otherwise you'll have to roll your own
<havenwood>
digitalcake1: Dunno best way. Just put together this method chaining way that keep it an enumerable most of the time: 1000.to_s.each_char.reverse_each.each_slice(3).reverse_each.map(&:join).join(',')
<havenwood>
digitalcake1: regex would be shorter
<popl>
uh
mikepack has quit [Ping timeout: 240 seconds]
tkuchiki_ has quit [Read error: Connection reset by peer]
<batman>
slash_nick, I don't think ruby gives access to low level io does it? I don't want to record keystrokes in a terminal, I want to monitor my daily letter presses
<batman>
in browser/gaming/etc
bigmac has quit [Quit: Leaving]
<slash_nick>
I don't think you'll find what you're looking for in ruby core, no
bradleyprice has joined #ruby
pipework has joined #ruby
tylersmith has joined #ruby
cj3kim has joined #ruby
<batman>
ok slash_nick
<batman>
ty
Davey has joined #ruby
fomatin has quit [Quit: Computer has gone to sleep.]
fomatin has joined #ruby
fomatin has quit [Client Quit]
subbyyy has quit [Ping timeout: 268 seconds]
sarkis has quit [Ping timeout: 240 seconds]
chrishough has quit [Quit: chrishough]
r0bgleeson has joined #ruby
krz has quit [Ping timeout: 268 seconds]
mansi has joined #ruby
x1337807x has joined #ruby
kil0byte has quit [Remote host closed the connection]
philcrissman_ has quit [Remote host closed the connection]
TIJ has joined #ruby
tonini has joined #ruby
<pontiki>
hmm, ruby as a keypress logger...
<L8D>
o.O
burlyscudd has quit [Quit: Leaving.]
<batman>
pontiki, one day
<batman>
until that day, I'll have to dig deeper
<batman>
into c.
<slash_nick>
yup
dankest has joined #ruby
<slash_nick>
gosu, batman ... wonder if pieces of it would help
<slash_nick>
or it
<L8D>
Can you code ruby libs in C
<batman>
inline c in ruby is possible
<havenwood>
L8D: C-ext
<batman>
yes
cfi30 has joined #ruby
<batman>
but then you might as well do it in c
<batman>
for such a simple proggy
krz has joined #ruby
Alina-malina has joined #ruby
<L8D>
Well, what if I wanted a lib for ruby that preforms something at a very low level?
mansi has quit [Ping timeout: 268 seconds]
<havenwood>
dun terminals usually have loggers? looking to write something that responds upon keystroke?
<havenwood>
slash_nick: nice, i setup a little play city with arduino stoplights and crosswalks but having TravisCI build fails physically shock me would be pretty cool
<L8D>
require 'io/console'
<L8D>
i = io.console.getch
<slash_nick>
$stdio.getch ?
<slash_nick>
is io.console a thing?
<slash_nick>
oops, stdin
<slash_nick>
havenwood: totally doable... :)
Beoran has quit [Ping timeout: 252 seconds]
mansi has joined #ruby
<pontiki>
L8D: there are lot of such things, including a fair bit of ruby itself
kadoo has joined #ruby
<pontiki>
havenwood: some people find other uses for keyloggers as well....
<pontiki>
slash_nick: io/console is a library of methods
robscomputer_ has quit [Ping timeout: 264 seconds]
<slash_nick>
pontiki: i know...
davedev24 has quit [Remote host closed the connection]
<pontiki>
oh ok
<pontiki>
guess i wasn't sure what you meant by io.console
<slash_nick>
I should've flagged a nick, pontiki :)
<pontiki>
no worries
ivanoats has joined #ruby
mansi has quit [Ping timeout: 246 seconds]
Inside has quit [Ping timeout: 264 seconds]
arya has quit [Ping timeout: 252 seconds]
artemeff has joined #ruby
artemeff has left #ruby [#ruby]
harrymoreno has joined #ruby
subbyyy has joined #ruby
splittingred has quit [Quit: splittingred]
lyanchih has quit [Quit: lyanchih]
bean has joined #ruby
fomatin has joined #ruby
arya has joined #ruby
cfi30 has quit [Quit: Page closed]
brennanMKE has joined #ruby
bean has quit [Ping timeout: 256 seconds]
kokobaby has quit [Ping timeout: 246 seconds]
tylersmith has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
TIJ has quit [Quit: Konversation terminated!]
dhruvasagar has joined #ruby
hadees has joined #ruby
butblack has joined #ruby
amh345 has joined #ruby
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<amh345>
I'm using FileUtils.cp(src,dest) to push files to a usb stick. what's the best way to know when the file is completed?
ngoldman has joined #ruby
zeade has joined #ruby
postmodern has quit [Ping timeout: 264 seconds]
rippa has quit [Ping timeout: 248 seconds]
lyanchih has joined #ruby
kokobaby has joined #ruby
ssvo has joined #ruby
Beoran has joined #ruby
kadoo has joined #ruby
redgirl has quit [Read error: Connection reset by peer]
redgirl_ has joined #ruby
hackeron_ has joined #ruby
splittingred has joined #ruby
hackeron has quit [Ping timeout: 255 seconds]
jimg has joined #ruby
byprdct has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DomKM has joined #ruby
butblack has left #ruby [#ruby]
ping-pong has quit [Ping timeout: 248 seconds]
<slash_nick>
amh345: could you poll the stick performing some kind of checksum?
kadoo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<amh345>
slash_nick: just keep checking src against destination?
<amh345>
in a while loop or something?
jimg has quit [Ping timeout: 256 seconds]
<slash_nick>
would that work for you?
<amh345>
good question. googlin it now
<amh345>
while is probably not the way
<amh345>
but i get what you're saying.
girija has joined #ruby
<slash_nick>
it's a thought :)
<amh345>
:)
EPIK has quit [Ping timeout: 264 seconds]
himsin has joined #ruby
fomatin has quit [Quit: Computer has gone to sleep.]
kil0byte has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
splittingred has quit [Quit: splittingred]
pootler_ has joined #ruby
hadees has quit [Quit: hadees]
bradleyprice has quit [Remote host closed the connection]
brennanMKE has quit [Ping timeout: 268 seconds]
bradleyprice has joined #ruby
moted has joined #ruby
harrymoreno has quit [Quit: harrymoreno]
dash_ has joined #ruby
ping-pong has joined #ruby
ngoldman has quit [Remote host closed the connection]
zeade has quit [Quit: Leaving.]
ngoldman has joined #ruby
DonRichie has joined #ruby
chrishough has joined #ruby
ezkl has joined #ruby
byprdct has joined #ruby
girija has quit [Ping timeout: 240 seconds]
burlyscudd has joined #ruby
ivanoats has quit [Remote host closed the connection]
martxel has joined #ruby
martxel is now known as Guest72379
brennanMKE has joined #ruby
vlad_starkov has joined #ruby
burlyscudd has quit [Ping timeout: 246 seconds]
kenmaz has joined #ruby
<amh345>
hmm. this looks like it could be a bit more complex than expected. multiple processes and such
havenwood has joined #ruby
sonne has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
<slash_nick>
in what context are you doing this
krainboltgreene has quit [Quit: krainboltgreene]
mansi has joined #ruby
pipework has quit [Remote host closed the connection]
kil0byte has quit [Read error: Connection timed out]
<amh345>
slash_nick: i have an app that creates a gif. i have a webpage that when a gif is clicked-- pushes that gifs file to a usb stick.
kil0byte has joined #ruby
<amh345>
i'd just like to know when the gif is copied over.
<amh345>
it's so tiny. that it probably doesn't even matter. but i kind of want to know just for myself.
<popl>
Is it a hidden webcam taking the gif?
<amh345>
popl: yes!
<amh345>
(no)
devyn_ has quit [Changing host]
devyn_ has joined #ruby
codecop has joined #ruby
cool has joined #ruby
Jackneill has joined #ruby
Jackneill has quit [Changing host]
ziyadb has joined #ruby
chuk has joined #ruby
ziyadb has joined #ruby
Jackneill has joined #ruby
devyn_ has quit [Quit: leaving]
tagrudev has joined #ruby
<amh345>
i've got everything working end to end. but yeah, just knowing a nice way to monitor a files progress would be really handy.
devyn has joined #ruby
kenmaz has quit [Ping timeout: 276 seconds]
<amh345>
way back when i did something like this . but i was in a bleary eyed state and totally do not remember any of it. or where the code even is.
timonv has joined #ruby
rezzack has joined #ruby
ananthakumaran has joined #ruby
postmodern has joined #ruby
mansi has quit [Ping timeout: 248 seconds]
cj3kim has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
kadoo has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brennanMKE has quit [Remote host closed the connection]
girija has joined #ruby
twoism has joined #ruby
twoism has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
r0bgleeson has quit [Ping timeout: 240 seconds]
mmozuras has joined #ruby
boblu has joined #ruby
mmozuras has quit [Client Quit]
oceanbreeze has joined #ruby
mmozuras has joined #ruby
<oceanbreeze>
Sup guys, every day i need to download second file http://www.cbr.ru/mcirabis/?Prtid=bic on this url, id like to automate that process, where should i start?
<oceanbreeze>
the file is names as tomorrow date, should i parse the date, and then if date is correct(tomorrow), file should be downloaded and placed in folder?
<oceanbreeze>
Can you give me an idea how script should look like?
<oceanbreeze>
bik_dc_2068_20062013.zip
<oceanbreeze>
this one
Aaaarg has quit [Quit: Aaaarg]
JohnBat26 has joined #ruby
blaxter has joined #ruby
dfdf has joined #ruby
sayan has quit [Read error: Connection reset by peer]
krisfremen has joined #ruby
krisfremen has quit [Changing host]
krisfremen has joined #ruby
Aaaarg has joined #ruby
kenmaz has quit [Remote host closed the connection]
mansi has joined #ruby
kenmaz has joined #ruby
bradleyprice has quit [Remote host closed the connection]
brennanMKE has quit [Remote host closed the connection]
arya has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby
Liothen has quit [Ping timeout: 245 seconds]
mikepack has joined #ruby
bradhe has joined #ruby
dmiller has joined #ruby
mansi has quit [Ping timeout: 241 seconds]
kenmaz has quit [Ping timeout: 264 seconds]
Hanmac has quit [Quit: Leaving.]
workmad3 has quit [Ping timeout: 256 seconds]
kevinykchan has joined #ruby
kil0byte has joined #ruby
arya has joined #ruby
kil0byte has quit [Remote host closed the connection]
huoxito has quit [Quit: Leaving]
bradhe has quit [Remote host closed the connection]
jprovazn has joined #ruby
jdunck has joined #ruby
havenwood has quit [Remote host closed the connection]
dmiller has quit [Ping timeout: 240 seconds]
arya has quit [Ping timeout: 264 seconds]
cod3r__ has quit [Read error: Operation timed out]
<advorak>
[ [1,2,3], [4,5,6] ].collect(&:first) ...... I want to do something like: first = :first ; [ [1,2,3], [4,5,6] ].collect(&#{first}) ..... what is the suggestion for inserting the symbol contained in the variable first?
danslo has joined #ruby
jds has quit [Remote host closed the connection]
jalcine has joined #ruby
quazimodo has joined #ruby
dfdf has quit [Remote host closed the connection]
taion809 has joined #ruby
timonv has quit [Remote host closed the connection]
Domon has quit [Remote host closed the connection]
binaryplease has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
snearch has joined #ruby
yashshah has joined #ruby
lyanchih has joined #ruby
arya has quit [Ping timeout: 248 seconds]
emergion has joined #ruby
lolmaus has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
<lolmaus>
Is Capistrano still the most actual deployment tool? Has there appeared anything new?
emergion has quit [Client Quit]
nazty has quit [Ping timeout: 264 seconds]
* apeiros
still doesn't get why people use things like capistrano
<apeiros>
I mean… it's like 10 lines in the shell - easy to script. but no, lets bring in a multi-K-codeline tool which most users barely understand what it is actually doing
slainer68 has joined #ruby
ferdev has quit [Ping timeout: 252 seconds]
ferdev has joined #ruby
nazty has joined #ruby
cdelo_ has joined #ruby
alekst has joined #ruby
freerobby has joined #ruby
ezkl has quit [Quit: Computer has gone to sleep.]
kenmaz has quit [Remote host closed the connection]
<Xeago>
apeiros: I think it is liked because it abstracts deployment away from developers
ToApolytoXaos has joined #ruby
<Xeago>
all my fellow colleague students have never heard of a symlink
<Xeago>
or atomicity
camilasan has joined #ruby
ezkl has joined #ruby
<apeiros>
Xeago: I assume they don't do software dev. either, or do they?
kil0byte_ has joined #ruby
<Xeago>
they get educated for big corporate enterprisey stuff
<Xeago>
some of them don't know the difference between IDE - editor, visual studio - editor
<Xeago>
or what JIT means
cdelo has quit [Ping timeout: 268 seconds]
Tamae has quit [Ping timeout: 268 seconds]
<Xeago>
or how caching mechanisms work
<apeiros>
no wonder big corp IT tends to suck…
<Xeago>
be it http caching or russian doll caching, never ever heard of it..
<Xeago>
I think its just the lack of thoroughness at my university
nettoweb has joined #ruby
agjacome has joined #ruby
jimg has joined #ruby
freerobby has quit [Ping timeout: 268 seconds]
kil0byte has quit [Ping timeout: 276 seconds]
statarb3 has joined #ruby
krz has quit [Ping timeout: 252 seconds]
sayan has joined #ruby
nazty has quit [Ping timeout: 276 seconds]
jimg has quit [Ping timeout: 268 seconds]
thelamest has quit [Quit: hup]
matthewrobbins has quit [Read error: Connection reset by peer]
matthewrobbins_ has joined #ruby
thelamest has joined #ruby
nazty has joined #ruby
Chris has joined #ruby
Chris is now known as Guest20377
krz has joined #ruby
nazty has quit [Read error: Connection reset by peer]
wudofyr___ has quit [Remote host closed the connection]
Soliah has quit [Ping timeout: 240 seconds]
wudofyr___ has joined #ruby
Tamae has joined #ruby
robustus has quit [Ping timeout: 248 seconds]
_veer has quit [Read error: Connection reset by peer]
robustus has joined #ruby
verto has joined #ruby
BizarreCake has quit [Quit: Leaving]
BizarreCake has joined #ruby
BizarreCake has quit [Client Quit]
nettoweb has quit [Quit: nettoweb]
ferdev has quit [Ping timeout: 276 seconds]
b0oh has joined #ruby
slainer68 has quit [Remote host closed the connection]
`MArceLL` has quit [Ping timeout: 246 seconds]
lkba has quit [Ping timeout: 240 seconds]
Macaveli has joined #ruby
malkomalko has joined #ruby
burlyscudd has joined #ruby
browndawg has joined #ruby
pranny has quit [Quit: Leaving.]
Aaaarg has joined #ruby
azerton has quit [Quit: azerton]
freerobby has joined #ruby
iamjarvo has joined #ruby
burlyscudd has quit [Ping timeout: 252 seconds]
yshh has joined #ruby
mansi has joined #ruby
gkunno has quit [Ping timeout: 248 seconds]
ldnunes has joined #ruby
falood has joined #ruby
fmcgeough has joined #ruby
gkunno has joined #ruby
jds has quit [Ping timeout: 264 seconds]
jonathanwallace1 has joined #ruby
ferdev has joined #ruby
freerobby has quit [Ping timeout: 252 seconds]
krz has quit [Quit: krz]
mansi has quit [Ping timeout: 264 seconds]
guiocavalcanti has quit [Remote host closed the connection]
kindjal has joined #ruby
_Renegade has quit [Quit: _Renegade]
guiocavalcanti has joined #ruby
gazarsgo has joined #ruby
guiocava_ has joined #ruby
lkba has joined #ruby
pi3r has quit [Quit: Leaving]
lyanchih has quit [Quit: lyanchih]
guiocavalcanti has quit [Ping timeout: 256 seconds]
Neomex has joined #ruby
Neomex has quit [Client Quit]
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
geekbri has joined #ruby
lyanchih has joined #ruby
kokobaby has quit [Ping timeout: 268 seconds]
razi has joined #ruby
osvico has quit [Ping timeout: 256 seconds]
ferdev has quit [Ping timeout: 264 seconds]
_Renegade has joined #ruby
ntus1017 has joined #ruby
kindjal has quit [Ping timeout: 240 seconds]
lyanchih has quit [Ping timeout: 240 seconds]
iamjarvo has quit [Quit: Leaving.]
r0bgleeson has joined #ruby
kindjal has joined #ruby
redgirl has joined #ruby
binaryplease has quit [Ping timeout: 248 seconds]
jds has joined #ruby
pzin has joined #ruby
alekst has quit [Quit: Computer has gone to sleep.]
pzin has left #ruby [#ruby]
arya has joined #ruby
taion809 has quit [Ping timeout: 276 seconds]
freerobby has joined #ruby
a_a_g1 has quit [Quit: Leaving.]
ezkl has quit [Quit: Computer has gone to sleep.]
kil0byte has joined #ruby
philcrissman_ has joined #ruby
camilasan has quit [Remote host closed the connection]
sayan has quit [Read error: Connection reset by peer]
mansi has quit [Ping timeout: 240 seconds]
senayar_ has quit [Remote host closed the connection]
Jackneill_ has joined #ruby
<yim>
like the actual disease
andikr has quit [Remote host closed the connection]
rafb3 has joined #ruby
<yim>
or is that a slang for something in programming
mikecmpbll has joined #ruby
<RORgasm>
hey guys
<RORgasm>
trying to figure out something
<ellipse>
It is not slang, I just used it as an analogy for PHP like 5 minutes ago.
<RORgasm>
does anyone know where in the C code the new ruby keyword arguments related code is? i'm trying to look at the implementation
Asher1 has quit [Ping timeout: 268 seconds]
kindjal has joined #ruby
<yim>
oh ok
kenmaz has quit [Remote host closed the connection]
<yim>
I guess I completely ignored that part :)
<ellipse>
The only pejorative for PHP I have heard repeatedly is PCP. ;P
Jackneill has quit [Ping timeout: 276 seconds]
senayar has joined #ruby
tagrudev has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
tomzx_mac has quit [Quit: tomzx_mac]
mansi has joined #ruby
<amanmangal>
hey guys! I am stuck with Capistrano, not able to deploy! I am deploying first time and it is giving error while creating directory, permission denied
<amanmangal>
please help
<amanmangal>
it's been whole day!
<ellipse>
Do you have write permissions for the parent directory?
nettoweb has quit [Quit: nettoweb]
<amanmangal>
root user has the permission not the app user
<ellipse>
That would be the issue then.
tomzx_mac has joined #ruby
kpshek has quit []
<amanmangal>
but in the deploy.rb file I have specified the following this
Mon_Ouie has joined #ruby
<amanmangal>
set :runner, 'root'
Appineer has joined #ruby
_br_ has joined #ruby
<amanmangal>
set :use_sudo, fals
<pipework>
Why not just use FFI with a library written in C?
<amanmangal>
set :user, 'app'
<pipework>
I mean, gosh.
<pipework>
Oh way old conversation.
<pipework>
Sorry. Didn't scroll down.
<ellipse>
If you're not using sudo, how do you expect it to elevate permissions?
<ellipse>
Unless you are actually running it as root.
<ellipse>
set :use_sudo, true
<amanmangal>
but that is not suggested in general
wallerdev has joined #ruby
<amanmangal>
doesn't capistrano do that? creating the directory using root permission and then changing the permissions to app user
<pipework>
I prefer to not use root myself.
<amanmangal>
yup
<pipework>
amanmangal: So what's up, sailor?
devoldmx has joined #ruby
bean has joined #ruby
<amanmangal>
I am not very much familiar with capistrano
<amanmangal>
but in general
<amanmangal>
when we depeloy
choobie has quit [Read error: Connection reset by peer]
<amanmangal>
we use the app user
richiebkr has joined #ruby
Jackneill_ has quit [Quit: Leaving]
<amanmangal>
which may not have the permission to create dirs
<amanmangal>
isn't that true?
mansi has quit [Ping timeout: 260 seconds]
camilasan has joined #ruby
choobie has joined #ruby
<amanmangal>
then how do we create dirs in the folder /mnt/my-app?
Jackneill has joined #ruby
paulswilliamsesq has quit [Ping timeout: 246 seconds]
<ellipse>
If the app user doesn't have the permission to create a directory, and it doesn't have a sudoers entry, how could it create the directory?
<ellipse>
It would be forbidden by the OS.
<amanmangal>
I thought capistrano will create directory using the root user
<amanmangal>
as I have specified runner to be root
<amanmangal>
can you please explain what do you mean by forbidden?
_Renegade has quit [Quit: _Renegade]
gazarsgo has quit [Quit: gazarsgo]
pootler_ has quit [Ping timeout: 260 seconds]
tk_ has quit [Quit: ばいばい]
girija has quit [Ping timeout: 276 seconds]
<amanmangal>
ohh...okay! yeah right
<amanmangal>
then how will I create the sudoers entry?
kristiandelay has quit [Remote host closed the connection]
F1skr has joined #ruby
supergiantrobot has joined #ruby
paulswilliamsesq has joined #ruby
zigomir has quit [Quit: zigomir]
kobain has joined #ruby
asteve has joined #ruby
cmarques has quit [Ping timeout: 264 seconds]
asteve has quit [Max SendQ exceeded]
Aaaarg has quit [Quit: Aaaarg]
xardas has joined #ruby
theRoUS has quit [Ping timeout: 264 seconds]
<zined>
ohai
<matti>
Ohai
falkoner has joined #ruby
prophile has quit [Changing host]
prophile has joined #ruby
cj3kim has joined #ruby
burlyscudd has quit [Quit: Leaving.]
sambao21 has quit [Quit: Computer has gone to sleep.]
Aristata has left #ruby [#ruby]
LaPetiteFromage has quit [Quit: LaPetiteFromage]
robscomputer has quit [Ping timeout: 246 seconds]
sayd has joined #ruby
<sayd>
i installed facter via a system migration. now when i run facter I see: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- facter/application (LoadError)
kil0byte has quit [Remote host closed the connection]
camilasan has quit [Remote host closed the connection]
krz has quit [Quit: WeeChat 0.4.0]
threesome has joined #ruby
jds has quit [Ping timeout: 246 seconds]
sambao21 has joined #ruby
burlyscudd has joined #ruby
<sayd>
does that seem like xcode is missing?
cj3kim has quit [Ping timeout: 264 seconds]
alup has quit [Quit: Leaving]
_Renegade has quit [Quit: _Renegade]
slash_nick has joined #ruby
slash_nick has quit [Changing host]
slash_nick has joined #ruby
bradleyprice has joined #ruby
<havenwood>
sayd: Are you meaning to be in Ruby 1.8?
ravster has joined #ruby
JumpMast3r has quit [Quit: JumpMast3r]
<ravster>
Hey all
<sayd>
I think so havenwood
<sayd>
its just a stock Mountain Lion
dr_bob has quit [Quit: Leaving.]
<havenwood>
sayd: Isn't indicative of Xcode missing, just that the gem isn't installed.
kenmaz has left #ruby ["Leaving..."]
<ericwood>
yep
Neomex has joined #ruby
Neomex has quit [Client Quit]
kasper has quit [Ping timeout: 256 seconds]
xardas has quit [Changing host]
xardas has joined #ruby
Guest72379 is now known as martxel
martxel has quit [Changing host]
martxel has joined #ruby
rdFLeece_ has joined #ruby
Aaaarg has joined #ruby
arietis has joined #ruby
<havenwood>
sayd: OS X 10.9 updates system Ruby to 2.0.0-p195, but in the meanwhile you can get 2.0.0-p195 with RVM, chruby/ruby-install or rbenv/ruby-build. Or with Homebrew.
carloslopes has joined #ruby
Solnse has joined #ruby
* ericwood
is looking forward to the default OS X ruby being 2.0 :D
<havenwood>
sayd: I personally use chruby/ruby-install on OS X and it works great. They both have brew installs.
r0bby has quit [Remote host closed the connection]
jackal_af1 has quit [Ping timeout: 264 seconds]
rolloTomasi1 has left #ruby ["WeeChat 0.3.8"]
DanKnox_away is now known as DanKnox
dhruvasagar has joined #ruby
Apane has quit [Ping timeout: 246 seconds]
bradhe has joined #ruby
jds has joined #ruby
enebo has quit [Quit: enebo]
ffranz has quit [Quit: Leaving]
dash_ has joined #ruby
Banistergalaxy has quit [Read error: Connection reset by peer]
r0bby has joined #ruby
ngoldman has quit [Remote host closed the connection]
Neomex has joined #ruby
Apane has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Shirakawasuna has joined #ruby
jondot has joined #ruby
Shirakawasuna has quit [Max SendQ exceeded]
interactionjaxsn has quit [Remote host closed the connection]
Shirakawasuna has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
interactionjaxsn has joined #ruby
devoldmx has quit [Ping timeout: 248 seconds]
richiebkr has quit [Quit: richiebkr]
JumpMast3r has joined #ruby
devoldmx has joined #ruby
[1]SoonerBourne has joined #ruby
DanKnox is now known as DanKnox_away
Hanmac has quit [Ping timeout: 268 seconds]
freerobby has quit [Quit: Leaving.]
interactionjaxsn has quit [Ping timeout: 255 seconds]
DanKnox_away is now known as DanKnox
burlyscudd has joined #ruby
SoonerBourne has quit [Ping timeout: 276 seconds]
[1]SoonerBourne is now known as SoonerBourne
Floydzy has joined #ruby
johnmlocklear_ has joined #ruby
codecop has joined #ruby
graft has quit [Ping timeout: 260 seconds]
rdFLeece has joined #ruby
angusiguess has quit [Ping timeout: 252 seconds]
sayan has joined #ruby
burlyscudd1 has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
rdark has quit [Ping timeout: 276 seconds]
dangerousdave has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
thesheff17 has quit [Read error: Connection reset by peer]
ivanoats has quit [Remote host closed the connection]
rdark has joined #ruby
burlyscudd has quit [Ping timeout: 248 seconds]
icole has joined #ruby
jalcine has joined #ruby
RORgasm has quit [Read error: Connection reset by peer]
RORgasm_ has joined #ruby
emmanuelux has joined #ruby
theRoUS has quit [Ping timeout: 258 seconds]
carlyle has quit [Remote host closed the connection]
guiocavalcanti has quit [Read error: Connection reset by peer]
num74 has joined #ruby
jackal_af has joined #ruby
devoldmx has quit [Ping timeout: 252 seconds]
thams has joined #ruby
RORgasm_ is now known as RORgasm
ngoldman has joined #ruby
devoldmx has joined #ruby
timonv has joined #ruby
<Skelz0r>
How can i test that nothing happen with capybara ?
<MrZYX>
test that something does not happen
freerobby has joined #ruby
rdark has quit [Ping timeout: 240 seconds]
slash_nick has quit [Read error: No route to host]
x1337807x has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
jalcine has quit [Remote host closed the connection]
<terrellt>
page.should_not have_content("stuff that shouldn't be there")?
icole has quit [Remote host closed the connection]
<MrZYX>
^
blitzkev has joined #ruby
<terrellt>
Or, even better. content = page.content (is that the method?), then do stuff, then page.content.should == content
rdFLeece_ has joined #ruby
<terrellt>
page.body it might be.
ngoldman_ has joined #ruby
burlyscudd has joined #ruby
robscomputer_ has joined #ruby
gazarsgo has joined #ruby
toddWork__ has joined #ruby
ViperMaul has joined #ruby
ramblex has quit [Remote host closed the connection]
<Skelz0r>
i had this idea, but it is an edge case : i got a page with items that can be filtered (filter just scale them at 0.001 scale)
mahmoudimus has joined #ruby
troessner has quit [Quit: Leaving]
slash_nick has joined #ruby
slash_nick has quit [Changing host]
slash_nick has joined #ruby
<Skelz0r>
i want to test that i don't play filtering animation twice in a row if user filters twice in a row
<Skelz0r>
dom will end up being the same and the page.body won't make it
wang_ has joined #ruby
QKO_ has joined #ruby
burlyscudd has quit [Client Quit]
yo61_ has joined #ruby
adambeynon has joined #ruby
supki_ has joined #ruby
error404_ has joined #ruby
firebury has joined #ruby
graft_ has joined #ruby
graft_ has quit [Changing host]
graft_ has joined #ruby
erry_ has joined #ruby
erry has quit [Killed (kornbluth.freenode.net (Nickname regained by services))]
erry_ is now known as erry
adambeynon has quit [Client Quit]
athst has quit [Quit: athst]
Spami has joined #ruby
heftig has quit [Quit: Quitting]
ngoldman has quit [*.net *.split]
graft has quit [*.net *.split]
burlyscudd1 has quit [*.net *.split]
rdFLeece has quit [*.net *.split]
robscomputer has quit [*.net *.split]
blitz has quit [*.net *.split]
Rizzle has quit [*.net *.split]
toddWork_ has quit [*.net *.split]
bjeanes has quit [*.net *.split]
wang has quit [*.net *.split]
firebury_ has quit [*.net *.split]
error404 has quit [*.net *.split]
yo61 has quit [*.net *.split]
QKO has quit [*.net *.split]
nnww has quit [*.net *.split]
supki has quit [*.net *.split]
Sp4rKy has quit [*.net *.split]
LucidDreamZzZ has joined #ruby
Banistergalaxy has joined #ruby
senayar has joined #ruby
sideshowcoder has quit [Read error: Connection reset by peer]
angusiguess has joined #ruby
byprdct has joined #ruby
rdark has joined #ruby
denver has quit [Remote host closed the connection]
binaryplease has quit [Ping timeout: 248 seconds]
alvaro_o has joined #ruby
Sp4rKy has joined #ruby
athst has joined #ruby
Spami has quit [Ping timeout: 264 seconds]
bjeanes has joined #ruby
rezzack has joined #ruby
khushildep has quit [Ping timeout: 264 seconds]
Banistergalaxy has quit [Ping timeout: 256 seconds]
_Andres has quit [Quit: jazz]
atmosx has joined #ruby
interactionjaxsn has joined #ruby
_Andres has joined #ruby
saintcajetan has joined #ruby
sambao21 has joined #ruby
devoldmx has quit [Ping timeout: 252 seconds]
chrishough has quit [Quit: chrishough]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
Neomex has quit [Quit: Neomex]
ananthakumaran has quit [Quit: Leaving.]
devoldmx has joined #ruby
sideshowcoder has joined #ruby
<Xeago>
So I got the message "Please `gem install rb-readline` or recompile ruby --with-readline."
thesheff17 has joined #ruby
<Xeago>
I installed rb-readline
<Xeago>
still get the message
<Xeago>
what to do?
gr4yscale has joined #ruby
<MrZYX>
recompile ruby with --with-readline?
<Xeago>
not really an option :\
pr0crastinat0r has joined #ruby
<_br_>
how come?
<_br_>
aren't you using rbenv or rvm ?
<Xeago>
have to use system ruby
<MrZYX>
which OS?
sayan has quit [Read error: Connection reset by peer]
<Xeago>
ubuntu12.04
<Xeago>
the most crippled distro ever
chrishough has joined #ruby
<yxhuvud>
hahah no
heftig has joined #ruby
jesly has quit [Ping timeout: 264 seconds]
<MrZYX>
oh, their headline is "The most popular free OS" now?
<MrZYX>
…
DanKnox is now known as DanKnox_away
<Xeago>
yxhuvud: convince me please
Layke has joined #ruby
<yxhuvud>
no, but they do what they do, and that is have somewhat modern packages.
<MrZYX>
"somewhat". Right
<Layke>
I'm attempting to run some plugin for NewRelic. They provide a Ruby plugin, I've gone through everything, and installed the bundle, but when I run, it errors. Here's the trace.
<yxhuvud>
extremely recent compared to debian stable or redhat
<Layke>
Does that scream out as being something obvious?
<yxhuvud>
which is what I have to use.
<MrZYX>
yxhuvud: still feels ancient if you tried arch
Dummies_freelanc has joined #ruby
johnrlive has joined #ruby
icole has joined #ruby
johnrlive has quit [Read error: Connection reset by peer]
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
devoldmx has quit [Ping timeout: 246 seconds]
<MrZYX>
Layke: guess you're passing in nil where it doesn't expect that
<Xeago>
regardless, I consider osx server, combined with brew better in all regards
<yxhuvud>
I mean seriously, ubuntu have had packaged ruby 1.9 since forever, even if it may not have been the defualt setup. redhat/centos still don't.
johnrlive has joined #ruby
Aaaarg has quit [Quit: Aaaarg]
jprovazn has joined #ruby
<MrZYX>
arch ditched ruby 1.9 for 2.0 from the repos
<Xeago>
I prefer fedora for servers over everything still
<MrZYX>
a few weeks ago already
devoldmx has joined #ruby
bigoldrock has joined #ruby
rdark has quit [Quit: leaving]
<Layke>
MrZYX, I just ran locally, and it seems to work. Just not on the server. I'll try seeing what's different :/
gr4yscale has quit [Quit: Computer has gone to sleep.]
<Layke>
Okay got it. Thanks. :) Updated everything and works
<MrZYX>
Xeago: if you can't use rbenv/rvm/chruby rebuilding the package is your best bet
nomenkun has joined #ruby
burlyscudd has joined #ruby
kirun has joined #ruby
ferdev has joined #ruby
zmike123 has quit [Ping timeout: 268 seconds]
<Xeago>
MrZYX: yea, filed a request with the sysadmin
DanKnox_away is now known as DanKnox
momomomomo has quit [Quit: momomomomo]
sideshowcoder has quit [Ping timeout: 264 seconds]
jds has quit [Ping timeout: 264 seconds]
Patchou has joined #ruby
harrymoreno has joined #ruby
Tamae has quit [Ping timeout: 248 seconds]
kenmaz has joined #ruby
nnww has joined #ruby
Fire-Dragon-DoL has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
tonini has joined #ruby
devoldmx has joined #ruby
jaybe_ is now known as jaybe
JohnBat26 has joined #ruby
generalissimo has joined #ruby
sideshowcoder has joined #ruby
pr0crastinat0r has quit [Quit: Leaving]
johnmilton has quit [Ping timeout: 276 seconds]
robscomputer_ has quit [Remote host closed the connection]
zeromodulus has joined #ruby
zeromodulus has quit [Changing host]
zeromodulus has joined #ruby
pr0crastinat0r has joined #ruby
viszu has quit [Quit: Leaving.]
kenmaz has quit [Ping timeout: 260 seconds]
Patchou has quit [Ping timeout: 256 seconds]
ellipse has joined #ruby
pi3r has quit [Quit: Leaving]
nightfly has quit [Quit: WeeChat 0.4.0]
kasper has joined #ruby
vlad_starkov has joined #ruby
DomKM has quit [Quit: Leaving.]
zastern has joined #ruby
zmike123 has joined #ruby
elliptical has joined #ruby
ebobby has joined #ruby
freerobby has quit [Quit: Leaving.]
sepp2k has joined #ruby
blitzkev is now known as blitz
ellipse has quit [Ping timeout: 264 seconds]
elliptical is now known as ellipse
ffranz has joined #ruby
ngoldman_ has quit [Remote host closed the connection]
shadoi has quit [Quit: Leaving.]
shadoi has joined #ruby
miskander has quit [Quit: miskander]
johnmilton has joined #ruby
jonahR has joined #ruby
gr4yscale has joined #ruby
byprdct has quit [Ping timeout: 252 seconds]
guiocavalcanti has joined #ruby
jibi has joined #ruby
Hanmac has joined #ruby
jimg has joined #ruby
miskander has joined #ruby
devoldmx has quit [Ping timeout: 248 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
bionoid has quit [Remote host closed the connection]
jackal_af has quit [Ping timeout: 240 seconds]
devoldmx has joined #ruby
pranny has joined #ruby
pranny has left #ruby [#ruby]
jackal_af has joined #ruby
jds has joined #ruby
burlyscudd has quit [Quit: Leaving.]
jimg has quit [Ping timeout: 248 seconds]
athst has quit [Quit: athst]
generalissimo has quit [Remote host closed the connection]
<canton7>
Eiam, general feature request, or specific request for help?
DrShoggoth has joined #ruby
net_mask has joined #ruby
<Eiam>
I was browsing through new things in ruby 2 hoping to stumble upon something like that, I saw some neat stuff like lazy enums etc but, so far no luck
burlyscudd has joined #ruby
<popl>
you mean like multimap?
<Eiam>
I write so much [].map {|x| x["attr"]}
workmad3 has joined #ruby
<Eiam>
and it drives me nuts
ChristianS has quit [Excess Flood]
Dekade has joined #ruby
<canton7>
just monkey-patch Hash if you're that bothered :)
niklasb has joined #ruby
ChristianS has joined #ruby
<Eiam>
nah I can't cause then everyone reading my code on the team would be like what the crap is this
timkohrumel has quit [Remote host closed the connection]
atno has quit [Remote host closed the connection]
miskander has quit [Quit: miskander]
jesly has joined #ruby
RORgasm has quit [Read error: Connection reset by peer]
RORgasm has joined #ruby
mrsolo has joined #ruby
miskander has joined #ruby
banister_ has joined #ruby
fomatin has joined #ruby
bobbyz has quit [Ping timeout: 240 seconds]
<popl>
Eiam: what would you example up there return?
<popl>
*your
skasio has quit [Ping timeout: 264 seconds]
skasio has joined #ruby
freerobby has joined #ruby
<apeiros>
Eiam: dude, use proper classes/objects
burlyscudd has quit [Read error: Connection reset by peer]
burlyscudd1 has joined #ruby
jesly has quit [Ping timeout: 240 seconds]
<apeiros>
then you can do things like .map(&:a)
<apeiros>
or .pluck(:a), or whatever
jkline has joined #ruby
<banister_>
apeiros: what pluck
<Eiam>
popl: [1,2,3,4]
DomKM has joined #ruby
gr4yscale has quit [Quit: Computer has gone to sleep.]
<Eiam>
yeah ruby deoesn't have pluck
<apeiros>
banister_: well, AR::Base#pluck, can easily be ported to Enumerable
fuzzyhorns has quit [Remote host closed the connection]
fomatin has joined #ruby
tourdedave has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
devoldmx has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
RORgasm_ is now known as RORgasm
Fr4n has joined #ruby
sepp2k1 has joined #ruby
avengedsixfold has joined #ruby
bionoid has joined #ruby
kasper has quit [Remote host closed the connection]
hadees has joined #ruby
suyase has joined #ruby
sepp2k has quit [Ping timeout: 246 seconds]
athst has joined #ruby
ehaliewicz has joined #ruby
blaxter_ has quit [Ping timeout: 264 seconds]
<suyase>
So if I'm digging through someone else's ruby app...and they created a class method that parses XML, but did not use any external XML parsing libraries to do this and actually WROTE the parser themselves, is this standard ruby practice or extremely bad design? (I'm not a ruby dev)
<Hanmac>
suyase: external (C++) gems are mostly better and often faster than self made code
devoldmx has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Quit: WeeChat 0.4.1]
devoldmx has joined #ruby
arietis has joined #ruby
arietis has quit [Client Quit]
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
kofno_ has joined #ruby
<suyase>
Hanmac: thanks
timkohrumel has joined #ruby
<suyase>
Is an if statement with a single line of code beneath it generally followed by an end?
kofno has quit [Ping timeout: 276 seconds]
kofno_ is now known as kofno
<jkline>
does anyone have a good example of a gem that is validated using test::unit and mocha mocks? I would like to see some examples of having mocks configured in setup method
<jkline>
I want to configure a test double and then run multiple assertions against it. I think it would be best to use multiple def test_foo methods so that the failures are more obviously tied to one method
jprovazn has quit [Quit: Odcházím]
chrishough_ has joined #ruby
tourdedave has quit [Quit: tourdedave]
chrishough has quit [Ping timeout: 263 seconds]
chrishough_ is now known as chrishough
<bigoldrock>
got a nested array question: suppose you have 2 arrays, a = "larry", "moe", "curly" and b = "car", "boat", "plane", "train", "bicycle", "motorcycle"
<bigoldrock>
you want it to have operations on elements as follows
Neener54 has quit [Remote host closed the connection]
cj3kim has joined #ruby
zastern has quit [Remote host closed the connection]
<bigoldrock>
larry & car, moe & boat, curly & plane, .... then larry & train, moe & bicycle, curly & motorcycle
b0oh has joined #ruby
<bigoldrock>
so the first array keeps up with the second even though it has fewer elements
<bigoldrock>
any ideas?
<suyase>
bigoldrock: I do
devoldmx has quit [Ping timeout: 256 seconds]
<suyase>
bigoldrock: pastebin some code
<bigoldrock>
ok, just a sec
cj3kim has quit [Read error: Connection reset by peer]
<_br_>
what is the most clever way of chunking a array into pairs of two as a subarray? Do I still need to rely on my old monkeypatching hack for that or is there something now in the stdlib2.0? e.g. [ a,b,c,d ] -> [ [a,b], [c,d] ]
jonathanwallace has joined #ruby
<bigoldrock>
will try those suggestsions, thanks jlundy & fryguy
<jlundy>
mine is a lot less elegant
tatsuya_o has joined #ruby
<Mon_Ouie>
each_slice(2).to_a
<jlundy>
you could also do some array merging, etc
<Mon_Ouie>
(Which has been around since 1.9, and in 1.8 it was just a bit longer to type)
<avengedsixfold>
I was wondering if anyone could point me in the right area for some documentation or points of view. I've written a json rest api using the rails api gem and redis, using unicorn behind nginx I managed 561 requests a second on m1 large aws box (4 unicorn workers).
<avengedsixfold>
I also wrote the same api in python and java and they managed 1039 and 2700 requets respectively. Is rails just not suitable for high load apis? I need the application to handle 5k requests and with java I could do that using a cluster of 3 servers with room spare, I'd need over 10 to run rails. Any thoughts appreciated!
<_br_>
Mon_Ouie: Ah, nice thanks. Yeah, sorry sometimes I live under a stone here..
Bira has joined #ruby
<suyase>
man
<suyase>
I came in here when I started digging through the ruby that the last dev team left for us to maintain
<suyase>
thinking I could pretty much figure out what they were doing and just get a few quick answers
<suyase>
and have everything worked out
jds has joined #ruby
<suyase>
but jesus christ reading ruby is like stabbing myself in the eyeballs with razors
pskosinski has quit [Remote host closed the connection]
carloslopes has quit [Remote host closed the connection]
<_br_>
suyase: o.O why? Somebody tried to do PHP or Pascal/C style Ruby ?
pskosinski has joined #ruby
ewag has quit [Ping timeout: 240 seconds]
<avengedsixfold>
suayse: I'm mainly a java dev and I find ruby beautiful
<avengedsixfold>
thats why I want to switch to it
momomomomo has joined #ruby
<avengedsixfold>
stick at it
<jlundy>
probably perl style ruby
* jlundy
hates perl
devoldmx has quit [Ping timeout: 248 seconds]
devoldmx has joined #ruby
<_br_>
jlundy: Thats funny, particularly since ruby has many things which are inspired from perl ^^
ewag has joined #ruby
chrishough has quit [Quit: chrishough]
cj3kim has quit [Read error: Connection reset by peer]
byprdct has joined #ruby
<cout>
_br_: but those "features" of ruby are usually frowned upon
<bigoldrock>
got closer with suggestions from fryguy (thanks)
<bigoldrock>
any suggestions for how to populate the last three nils?
<jlundy>
_br_: yeah I know. I have run across ruby wrote like it was like perl and I disliked that code too. :)
cj3kim has joined #ruby
Lubinski has quit [Read error: Connection reset by peer]
Appineer has joined #ruby
<_br_>
cout: Utter nonsense!
dmiller has joined #ruby
Jackneill has quit [Ping timeout: 240 seconds]
mansi has quit [Remote host closed the connection]
<banister_>
_br_: he's right, they often are frowned upon, esp things like the special globals
sambao21 has quit [Quit: Computer has gone to sleep.]
<fryguy>
bigoldrock: check out array#cycle
mansi has joined #ruby
<bigoldrock>
ok, thanks
<_br_>
banister_: So we are frowning on the whole timtowtdi idea too? Nonsense.
<banister_>
_br_: No, mainly just the special globals
<Mon_Ouie>
And flip flops
<_br_>
Everything has its use, and should be used with care in the right circumstance.
<banister_>
_br_: sometimes language designers make mistakes :)
<banister_>
they're no infallible ;)
<banister_>
not*
luckyruby has joined #ruby
<_br_>
banister_: Actually, the whjole field of language design is one gigantic tradeoff. Such terminology as mistake makes no sense, because these are all shades of gray.
<banister_>
_br_: no, some things are genuine mistakes
<_br_>
Such as ?
<banister_>
_br_: such as the scope of block variables in 1.8
devoldmx3 has joined #ruby
<banister_>
_br_: x = 10 (1..5).each { |x| } x #=> 5
ELLIOTTCABLE has quit [Remote host closed the connection]
<_br_>
True, that was certainly a mis-feature
ELLIOTTCABLE has joined #ruby
chrishough has joined #ruby
wsterling has quit [Remote host closed the connection]
<jlundy>
I dont mind the language as much as how the userbase uses it
<jlundy>
perl has some great stuff
<avengedsixfold>
any thoughs on my unicorn rails api examples 500 requests a second vs java's 2700 or python's 1000+
<avengedsixfold>
?
<jlundy>
its just the users seem to take it as a challenge to make the code as hard to read as humanly possible
<cout>
that comes easy in perl
<jlundy>
granted the language makes it easy for them with the billions of ways of doing simple things
<jlundy>
cout: aye. :-(
mansi has quit [Ping timeout: 264 seconds]
<cout>
I've written some awesomely unreadable perl code back in the day
<cout>
even perl gurus had trouble wit hit
<_br_>
I don't know. I have designed my own Toy languages and speaking from that, I personally think langauge design is a seriously complex task. There are so many concepts that getting somethings not perfect on the first try is a given. That being said, generally dismissing everything from perl as "frowed upon" is not good. Sure, banister_ you specificed that to the misfeatures, but the other stuff from perl is good then?
idletom has joined #ruby
<cout>
_br_: I don't think anyone said that
<banister_>
_br_: well, the special globals are weird, why anyone would use $: instead of $LOAD_PATH, for example
wsterling has joined #ruby
<cout>
banister_: sorry :(
<banister_>
and there's a tonne of even more obscure globals
kil0byte has quit [Remote host closed the connection]
<banister_>
hehe yeah $: isn't the most obscure one
<_br_>
Well, I don't want to nitpick, but you mentioned "cout > _br_: but those "features" of ruby are usually frowned upon"
<banister_>
:))
<_br_>
well sure you should use $LOAD_PATH, there was misuse of that
persand has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
sailias has quit [Quit: Leaving.]
guiocavalcanti has quit [Read error: Connection reset by peer]
<_br_>
Doesn't change the fact though that in both cases the problem was solved by these 'evil' globals.
jonathanwallace has quit [Ping timeout: 246 seconds]
<cout>
_br_: again, nobody said "evil" except for you
atmosx has quit [Quit: And so the story goes…]
sambao21 has joined #ruby
ghanima has joined #ruby
<ghanima>
hello all
momomomomo has quit [Quit: momomomomo]
mansi has joined #ruby
avengedsixfold1 has joined #ruby
<_br_>
cout: Sure, frowned upon is not evil. You are right, I overstated that.
persand has quit [Client Quit]
<ghanima>
quick question... I am working with a REST API that allows to submit http put operations. I am trying to find a tutorial on how to assemble a JSON object based
<jkline>
bigoldrock: actually use flat_map instead of map to avoid the nested arrays
<ghanima>
is anyone aware of any tutorials
slainer68 has joined #ruby
sqbell has joined #ruby
<_br_>
ghanima: Try the oj gem, its pretty nice.
<bigoldrock>
thanks jkline
<bigoldrock>
this worked for me "a.cycle(2).zip(b)"
avengedsixfold has quit [Ping timeout: 248 seconds]
<jkline>
bigoldrock: yeah, I just saw that suggestion too, this works too transport.zip(stooges.cycle)
<bigoldrock>
using .count to sort out the number (in this case 2)
<bigoldrock>
ok, always good to know more than one way to do this .. cool!
idletom has quit []
<ghanima>
_br_ pretty much JSON is a hash really that's all it is.... I will take a look at that gem but just so I understand I just really have to supply hash and cal the j method against it
<jkline>
ghanima: json is not a has, json is a string...
<_br_>
ghanima: Well, sure its a hash. The reason I mention that gem is because it provides a much faster interface to json as the standard api imo.
bradhe has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
<jkline>
sqbell: look at FakeFS
tw1sted has left #ruby [#ruby]
<_br_>
jkline: Probably he thinks in terms of keys and values hence the terminology.
ivanoats has joined #ruby
devoldmx3 has quit [Ping timeout: 246 seconds]
Criztian has quit [Remote host closed the connection]
r0bgleeson has joined #ruby
wsterling has quit [Remote host closed the connection]
<jkline>
_br_: yes, he is not the only one. "JSON object" is a very common phrase, but technically wrong. I only bring it up because I think it is an important technicality. JSON being a serialization format
jimg has joined #ruby
persand has joined #ruby
<jkline>
but I could be wrong too, by misunderstanding the context
<jkline>
like foo = JSON.new would give you an object of type JSON for example...
zmike123 has quit [Quit: Выходжу]
asteve has quit [Ping timeout: 264 seconds]
gr4yscale has quit [Quit: Computer has gone to sleep.]
<_br_>
jkline: You are quite right imo, probably a clash of ruby thinking vs. javascript thinking
<jkline>
_br_: what do you mean? I think what I said applies to both Ruby and javascript
RORgasm has quit [Read error: Connection reset by peer]
RORgasm has joined #ruby
<_br_>
jkline: Never mind that, I think I just blabber nonsense currently. You are right.
redgirl has quit [Quit: This computer has gone to sleep]
<jkline>
_br_: lol . I have been known to blabber nonsense as well :)
jimg has quit [Ping timeout: 256 seconds]
m8 has joined #ruby
dmiller has quit [Remote host closed the connection]
gr4yscale has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
fuzzyhorns has joined #ruby
miskander has joined #ruby
miskander has quit [Client Quit]
guiocava_ has joined #ruby
guiocavalcanti has quit [Ping timeout: 246 seconds]
<Mon_Ouie>
hash tables in JSON are called objects
yalue has quit [Quit: Leaving]
gr4yscale has quit [Client Quit]
dmiller has joined #ruby
Dreamer3 has quit [Quit: Computer has gone to sleep.]
burlyscudd1 has quit [Quit: Leaving.]
_main_ has joined #ruby
brbcoding has quit []
ngoldman has joined #ruby
momomomomo has joined #ruby
Neener54 has joined #ruby
<jkline>
Mon_Ouie: what do you mean "hash tables in JSON"? It sounds to me like you mean "a hash table serialized into JSON", it becomes a string
persand has quit [Quit: persand]
<jkline>
or, actually, you're refering to the spec aren't you. "An object is an unordered set of name/value pairs", yes, my mistake
<Mon_Ouie>
Yes, indeed
__main__ has quit [Ping timeout: 245 seconds]
_main_ has quit [Read error: Connection reset by peer]
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
__main__ has joined #ruby
mansi_ has joined #ruby
mansi has quit [Read error: Connection reset by peer]
mocfive has joined #ruby
ebobby has quit [Ping timeout: 246 seconds]
mansi_ has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
mansi has joined #ruby
rrecio has joined #ruby
timonv has quit [Remote host closed the connection]
Bry8Star{T2 has joined #ruby
angusiguess has quit [Ping timeout: 240 seconds]
rrecio has quit [Remote host closed the connection]
rrecio has joined #ruby
<sqbell>
jkline: Thanks, works great.
pyrac has joined #ruby
mikepack has quit [Remote host closed the connection]
chrisja has joined #ruby
_main_ has joined #ruby
johnmlocklear_ has quit [Read error: Operation timed out]
ebobby has joined #ruby
__main__ has quit [Ping timeout: 248 seconds]
Mon_Ouie has quit [Read error: Operation timed out]
avengedsixfold1 has left #ruby [#ruby]
eldariof has quit [Ping timeout: 264 seconds]
_main_ is now known as __main__
bradhe has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
sayan has quit [Ping timeout: 264 seconds]
xardas has quit [Ping timeout: 268 seconds]
sambao21 has joined #ruby
mikepack has joined #ruby
JohnBat26 has quit [Ping timeout: 248 seconds]
BSaboia has joined #ruby
kasper has joined #ruby
ckrailo has quit [Ping timeout: 246 seconds]
_br_ has quit [Quit: leaving]
suyase has left #ruby [#ruby]
kevinykchan has quit [Quit: Computer has gone to sleep.]
mansi has quit [Read error: Connection reset by peer]
byprdct has quit [Ping timeout: 248 seconds]
mansi has joined #ruby
ckrailo has joined #ruby
stonevil has quit [Remote host closed the connection]
gasbakid has joined #ruby
mansi has quit [Read error: Connection reset by peer]
KhalilC has joined #ruby
mansi has joined #ruby
kasper has quit [Ping timeout: 248 seconds]
dash_ has quit [Quit: Time to beer :)]
rippa has quit [Ping timeout: 248 seconds]
jkline has quit [Quit: jkline]
sethetter has joined #ruby
greenarrow has quit [Read error: Connection reset by peer]
adambeynon has joined #ruby
fomatin has quit [Quit: Computer has gone to sleep.]
fomatin has joined #ruby
fomatin has quit [Client Quit]
sailias has quit [Ping timeout: 264 seconds]
geekbri has quit [Remote host closed the connection]
Appineer has quit [Remote host closed the connection]
snearch has joined #ruby
pyrac has quit [Quit: pyrac]
havenwood has joined #ruby
geggam has quit [Remote host closed the connection]
carlyle_ has joined #ruby
devoldmx has joined #ruby
ELLIOTTCABLE has quit [Remote host closed the connection]
ELLIOTTCABLE has joined #ruby
tonini has quit [Quit: leaving]
gr4yscale has joined #ruby
<Solnse>
I'm trying to iterate through a list of items that each contain and attribute of item_group and return the result grouped by item_group. I believe I need to have a nested .each block with a yield but I don't know how to write it correctly. Is there an example posted somewhere I can look at?
<havenwood>
Solnse: Can you paste a Gist of example input and the expected output?
thams has quit [Quit: thams]
sambao21 has quit [Quit: Computer has gone to sleep.]
b0oh has quit [Quit: Leaving.]
carlyle has quit [Ping timeout: 245 seconds]
<Solnse>
I can't really... but I can create something I think that would illustrate my goals...
freerobby has quit [Quit: Leaving.]
twoism has quit [Read error: Connection reset by peer]
<Solnse>
I've just got a list of items... for example menu items, and an example item might be ceaser salad... the item_group would be "salads"... and I'm trying to return all menu items, grouped by their item_group (like a category)
twoism has joined #ruby
jds has quit [Ping timeout: 252 seconds]
<apeiros>
Solnse: Enumerable#group_by
Bira has quit [Remote host closed the connection]
<apeiros>
might instasolve your problem
<apeiros>
not sure, though, as I'm not sure I understand what exactly you're asking
sqbell has quit [Ping timeout: 260 seconds]
freerobby has joined #ruby
kpshek has quit []
<Solnse>
I'm returning a JSON array and I' just trying to have each item already categorized in the document.
w0rldmaker has joined #ruby
Floydzy has quit [Quit: Floydzy]
pyrac has joined #ruby
sethetter has left #ruby [#ruby]
devoldmx3 has joined #ruby
jkline has joined #ruby
celestius has joined #ruby
arya has quit [Ping timeout: 248 seconds]
<celestius>
does ensure not actually return a value?
<workmad3>
apeiros: however, it also doesn't say it can
wmoxam has quit [Ping timeout: 268 seconds]
Lubinski has joined #ruby
<nefilim>
hi, im new to ruby, trying to figure out how what looks like hash literals that are passed to Class.new… is that right? does one need a special constructor to do that ?
<sethetter>
havenwood: I'm looking to do the reverse. Send a POST request with a query string in the URL.
<workmad3>
apeiros: section 4.3 states this btw 'A server SHOULD read and forward a message-body on any request; if the request method does not include defined semantics for an entity-body, then the message-body SHOULD be ignored when handling the request.'
Spooner has joined #ruby
bionoid has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<workmad3>
so I guess that can be interpreted with the various method semantics to take it as the request body should be ignored for GET because it doesn't define semantics for it
<havenwood>
sethetter: Sounds like a POST request.
<banister_>
nefilim: you need to show a gist of what you mean, i have no idea what your'e talking about
<workmad3>
sethetter: query strings are fine in a POST... they're just part of the URL after all :)
_theriffer_ has quit [Quit: _theriffer_]
<sethetter>
havenwood: It is, I was just having trouble getting the Ruby cgi class to get the query string params. It wouldn't put them in the params hash
<havenwood>
nefilim: When you MyClass.new, the #initialize method is called. Whether #initialize takes a hash or whatever else is your choice.
rfizzle has left #ruby [#ruby]
Dreamer3 has joined #ruby
helvete has joined #ruby
atyz has quit [Read error: Connection reset by peer]
devoldmx3 has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
Takumo has joined #ruby
Dreamer3__ has joined #ruby
sambao21 has joined #ruby
<Takumo>
So... Trying to install mongoid_tree and I get this wonderful error: Unable to resolve dependencies: ruby2ruby requires sexp_processor (~> 4.0); ruby_parser requires sexp_processor (~> 4.1)
<Takumo>
Sugesstions anyone?
devoldmx has quit [Ping timeout: 264 seconds]
Dreamer3 has quit [Ping timeout: 240 seconds]
jlast has quit [Remote host closed the connection]
Al__ has quit [Ping timeout: 246 seconds]
devoldmx has joined #ruby
<Takumo>
I mean if I can see what ruby_parser and ruby2ruby are dependencies of I might be able to remove the gem which depends on one of the them
devoldmx3 has quit [Ping timeout: 240 seconds]
atno has joined #ruby
Al__ has joined #ruby
codecop has quit [Remote host closed the connection]
Apane has quit [Ping timeout: 256 seconds]
gasbakid has quit [Read error: Connection reset by peer]
failshell has quit [Remote host closed the connection]
<terrellt>
matchaw: You should be getting "test1", "done". You won't get what you want because "unless test1? && test2?" is the same thing as "if !test1? || !test2?" and !test1? is true, so there's no need to check the second option.
hawtin has quit [Ping timeout: 240 seconds]
echevemaster has joined #ruby
EPIK has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
akells` has quit [Remote host closed the connection]
<matchaw>
terrellt: Yea I gathered that but I need to run both test1 & test2 methods but only print done when both return true.
<matchaw>
any ideas?
<terrellt>
if test1? && test2?
Xeago has joined #ruby
Banistergalaxy has joined #ruby
<oz>
matchaw: you want bitwise AND then: unless test1? & test2? ...
<terrellt>
matchaw: Oz is right, bitwise AND will work. If you only want it to print done when both return true you'll have to do if test1? & test2? though.