<ruby[bot]>
havenwood: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<havenwood>
bot is down
<havenwood>
#=> [5, 15, 30]
<havenwood>
felipec: how about a simple solution like that ^?
<felipec>
havenwood: yeah, when I can't find a functional soltuion I fall to imperative ones, but I thought there must be a way for a simple one line solution
<havenwood>
felipec: there's something really stateful about it
<baweaver>
sum?
<havenwood>
[5, 10, 15] #=> [5, 15, 30]
<baweaver>
a = [5, 10, 15]; a.map.with_index { |n, i| i > 0 ? n + a[i - 1] : n }
<baweaver>
ah, no, not quite
<baweaver>
one sec
<felipec>
cumulative sum
<baweaver>
>> [5, 10, 15].reduce([]) { |a,i| a << a.last.to_i + i }
<ruby[bot]>
baweaver: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<baweaver>
# => [5, 15, 30]
<havenwood>
baweaver: that's what i came up with too! check scrollback :-)
<baweaver>
ahhhh
quobo has quit [Quit: Connection closed for inactivity]
bronson has joined #ruby
cdg_ has joined #ruby
Guest29596 has joined #ruby
cdg has quit [Ping timeout: 265 seconds]
bronson has quit [Ping timeout: 240 seconds]
cdg_ has quit [Ping timeout: 240 seconds]
troys is now known as troys_
darkhanb_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rrutkowski_ has joined #ruby
rrutkowski has quit [Ping timeout: 240 seconds]
weathermaker has quit [Quit: weathermaker]
rrutkowski_ has quit [Client Quit]
rrutkowski has joined #ruby
DTZUZU has joined #ruby
Axy has quit [Ping timeout: 255 seconds]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
zwliew has quit [Quit: Connection closed for inactivity]
nit3rid3 has joined #ruby
govg has quit [Ping timeout: 240 seconds]
fmcgeough has joined #ruby
leitz has quit [Quit: Nappy time]
gnufied has joined #ruby
<ramfjord>
I'm writing a migration to drop 4 columns on a heavily accessed table, so I'll probably be setting the lock timeout and retrying over and over until I can get the lock. I'm thinking I should just drop all 4 in a single ALTER TABLE once I finally get the lock - would there be any reason to do 1 at a time? I'm guessing these calls will be super fast even on our large prod table since it's just updating the
<ramfjord>
metadata - it went fine on staging.
<ramfjord>
doh thought his was postgres IRC - sorry guys!
Azure has quit [Read error: Connection reset by peer]
Azure|dc has joined #ruby
pastorinni has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
sammi` has joined #ruby
r3kz has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
<ruby[bot]>
felipec: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<felipec>
Can I make { |e| e.round(2) } a proc or a lambda and pass it to map?
sammi` has quit [Ping timeout: 268 seconds]
alfiemax has joined #ruby
pastorinni has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 240 seconds]
<felipec>
Got it: array.map(&lambda)
Axy has joined #ruby
gizmore has joined #ruby
Mia has quit [Ping timeout: 248 seconds]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xa0s_ has joined #ruby
gizmore|2 has quit [Ping timeout: 240 seconds]
Azure|dc has quit [Read error: Connection reset by peer]
Azure has joined #ruby
bronson has joined #ruby
xa0s_ has quit [Quit: leaving]
Guest29596 has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
sammi` has joined #ruby
RyanMcCoskrie has joined #ruby
<ramfjord>
felipec: yup! too bad there's no magic syntax for curried functions like that. One could hope for `array.map(&:round(2))`, but such does not exist
alfiemax has joined #ruby
sammi` has quit [Ping timeout: 268 seconds]
shaw908 has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Troy2 has quit [Ping timeout: 240 seconds]
rrutkowski has quit [Quit: rrutkowski]
rrutkowski has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fmcgeough has quit [Quit: fmcgeough]
jameser has joined #ruby
rrutkowski has quit [Client Quit]
shaw908 has quit [Quit: Page closed]
justicefries has joined #ruby
rrutkowski has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
npgm has quit [Quit: Connection closed for inactivity]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ledestin has joined #ruby
guardianx has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
izaac_ has joined #ruby
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shaw908 has joined #ruby
sammi` has joined #ruby
<shaw908>
.
shaw908 has quit [Client Quit]
izaac has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
alfiemax has joined #ruby
justicefries has joined #ruby
kapil___ has joined #ruby
ptx0 has quit [Ping timeout: 248 seconds]
alfiemax has quit [Ping timeout: 248 seconds]
ramfjord has quit [Ping timeout: 264 seconds]
rrutkowski has quit [Quit: rrutkowski]
herbmillerjr has quit [Quit: Konversation terminated!]
troys_ is now known as troys
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justicefries has joined #ruby
herbmillerjr has joined #ruby
uZiel has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
dstrunk has joined #ruby
bronson has joined #ruby
nit3rid3 has quit [Quit: Leaving]
ptx0 has joined #ruby
PaulCapestany has quit [Quit: .]
MaksimPinigin has quit [Quit: My computer went into sleep mode or I turned it off]
MaksimPinigin has joined #ruby
cdg has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
PaulCapestany has joined #ruby
Inoperable has joined #ruby
darkhanb has joined #ruby
RyanMcCoskrie has quit [Ping timeout: 248 seconds]
immune has quit [Ping timeout: 256 seconds]
troys is now known as troys_
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
uZiel has quit [Remote host closed the connection]
uZiel has joined #ruby
dstrunk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
ur5us has quit [Remote host closed the connection]
dviola has quit [Quit: WeeChat 2.0.1]
s3nd1v0g1us has quit [Quit: tempusfugit]
v0dro has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jabreity_ has joined #ruby
pharma_joe has joined #ruby
jabreity_ is now known as jabreity
mikhael_k33hl has joined #ruby
bronson has joined #ruby
<mikhael_k33hl>
I've declared a constant in my Module - named AppLog- . . . the constant is for Logger.new(), but I think referring to it everytime i want to log is a bit ugly, e.g. AppLog::LOG.info . . . is there any better way to do it?
jxv has joined #ruby
bronson has quit [Ping timeout: 276 seconds]
Troy2 has joined #ruby
gix has joined #ruby
Troy2 has quit [Ping timeout: 276 seconds]
gix- has quit [Ping timeout: 268 seconds]
skweek has joined #ruby
alfiemax has joined #ruby
goatish has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DTZUZO has quit [Quit: WeeChat 2.0]
ta_ has joined #ruby
mjolnird has joined #ruby
izaac has joined #ruby
izaac_ has quit [Ping timeout: 276 seconds]
vondruch has quit [Ping timeout: 252 seconds]
uZiel has quit [Ping timeout: 272 seconds]
uZiel has joined #ruby
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justicefries has joined #ruby
justicefries has quit [Client Quit]
unayung has joined #ruby
bronson has joined #ruby
aupadhye has joined #ruby
guardianx has quit []
skweek has quit [Quit: Leaving]
alfiemax has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 276 seconds]
huddy has quit [Quit: Connection closed for inactivity]
AJA4350 has quit [Quit: AJA4350]
pharma_j_ has joined #ruby
pharma_joe has quit [Ping timeout: 265 seconds]
Axy has quit [Read error: Connection reset by peer]
prutheus has joined #ruby
pharma_j_ has quit [Ping timeout: 248 seconds]
<prutheus>
Hello. I am on rails. I want to download a file via a send_file call. This worked yesterday. But however, now it does not work anymore. When I click on my URL which calls a function where send_file is inside, no file gets downloaded. But in the server log, the send_file was successful (but with 0.1ms every time, what is too few for such a big file). So what could I do wrong? What part of code do you need to see?
cdg has quit [Remote host closed the connection]
alfiemax_ has joined #ruby
nowhereman_ has quit [Ping timeout: 264 seconds]
jxv has quit [Quit: zzz…]
skweek has joined #ruby
jameser has quit [Remote host closed the connection]
kapil___ has quit [Quit: Connection closed for inactivity]
jameser has joined #ruby
ramfjord has joined #ruby
immune has joined #ruby
KeyJoo has joined #ruby
ramfjord has quit [Ping timeout: 268 seconds]
iamarun has joined #ruby
nowhereman_ has joined #ruby
oleo has quit [Quit: Leaving]
prutheus has quit [Quit: Page closed]
immune has quit [Ping timeout: 276 seconds]
Giphy[m] has quit [Ping timeout: 264 seconds]
zalipuha[m] has quit [Ping timeout: 264 seconds]
aviraldg has quit [Ping timeout: 264 seconds]
Nightmare has quit [Ping timeout: 264 seconds]
naprimer2 has quit [Ping timeout: 240 seconds]
zalipuha[m] has joined #ruby
aviraldg has joined #ruby
Nightmare has joined #ruby
Giphy[m] has joined #ruby
naprimer has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NightMonkey has joined #ruby
MobiBleu has joined #ruby
unayung has left #ruby [#ruby]
immune has joined #ruby
dionysus69 has joined #ruby
troys_ is now known as troys
Pisuke has joined #ruby
MyMind has quit [Ping timeout: 256 seconds]
bronson has joined #ruby
zwliew has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
reber has joined #ruby
immune has quit [Ping timeout: 240 seconds]
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
mtkd has quit [Ping timeout: 248 seconds]
ta_ has quit [Remote host closed the connection]
k0mpa has quit [Ping timeout: 272 seconds]
ta_ has joined #ruby
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
mtkd has joined #ruby
ta_ has quit [Remote host closed the connection]
guardianx has quit []
kapil___ has joined #ruby
troys has quit [Quit: Bye]
RyanMcCoskrie has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
clemens3 has joined #ruby
Xiti has quit [Quit: Xiti]
skweek has quit [Remote host closed the connection]
Sembei has joined #ruby
apeiros has quit [Remote host closed the connection]
Xiti has joined #ruby
apeiros has joined #ruby
Pisuke has quit [Ping timeout: 248 seconds]
sundhell_away is now known as sundhell
Hobbyboy has quit [Ping timeout: 252 seconds]
BlaDe^ has quit [Ping timeout: 255 seconds]
amatas has joined #ruby
mark_66 has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
aufi has joined #ruby
Hobbyboy has joined #ruby
Inoperable has quit [Ping timeout: 260 seconds]
Inoperable has joined #ruby
andikr has joined #ruby
immune has joined #ruby
MyMind has joined #ruby
nowhereman_ has quit [Ping timeout: 276 seconds]
Ishido has quit [Ping timeout: 256 seconds]
jameser has joined #ruby
Sembei has quit [Ping timeout: 248 seconds]
nowhereman_ has joined #ruby
immune has quit [Ping timeout: 268 seconds]
conta has joined #ruby
ta_ has joined #ruby
anisha has joined #ruby
Ishido has joined #ruby
skweek has joined #ruby
ta__ has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
Inoperable has quit [Quit: WeeChat 2.0.1]
iamarun has quit [Remote host closed the connection]
bronson has joined #ruby
iamarun has joined #ruby
ta__ has quit [Remote host closed the connection]
ta_ has joined #ruby
bronson has quit [Ping timeout: 268 seconds]
volix has quit [Ping timeout: 256 seconds]
immune has joined #ruby
roshanavand has joined #ruby
darkhanb has joined #ruby
ptx0 has quit [Quit: rebooting]
nowhereman_ has quit [Ping timeout: 248 seconds]
volix has joined #ruby
cdg has joined #ruby
dionysus69 has quit [Ping timeout: 264 seconds]
ptx0 has joined #ruby
ana_ has joined #ruby
immune has quit [Ping timeout: 268 seconds]
cdg has quit [Ping timeout: 252 seconds]
<RyanMcCoskrie>
Can someone tell me how to properly exit on EOF when reading from a terminal instead of a file?
<RyanMcCoskrie>
The usual file reading loop results in prompts being written AFTER reading the users command
dionysus69 has joined #ruby
ramfjord has joined #ruby
sundhell is now known as sundhell_away
ramfjord has quit [Ping timeout: 240 seconds]
nowhereman_ has joined #ruby
alex`` has joined #ruby
zachary12 has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
claudiuinberlin has joined #ruby
sundhell_away is now known as sundhell
skweek has quit [Ping timeout: 260 seconds]
rabajaj has joined #ruby
zachary12 has joined #ruby
RyanMcCoskrie has quit [Remote host closed the connection]
Burgestrand has joined #ruby
v0dro has quit [Quit: Leaving]
TomyWork has joined #ruby
maufart has joined #ruby
Asher has joined #ruby
vondruch has joined #ruby
maufart has quit [Client Quit]
bronson has joined #ruby
tvw has joined #ruby
bronson has quit [Ping timeout: 255 seconds]
alfiemax_ has quit [Remote host closed the connection]
alfiemax has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
raynold has quit [Quit: Connection closed for inactivity]
aufi_ has joined #ruby
zwliew has quit [Quit: Connection closed for inactivity]
rrutkowski has joined #ruby
aufi_ has quit [Client Quit]
mtkd has quit [Ping timeout: 260 seconds]
aufi has quit [Quit: Leaving]
aufi_ has joined #ruby
mtkd has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Emmanuel_Chanel has quit [Ping timeout: 264 seconds]
nadir has joined #ruby
hurricanehrndz has quit [Quit: Goodbye]
rrutkowski has quit [Quit: rrutkowski]
hurricanehrndz has joined #ruby
guille-moe has joined #ruby
amatas_ has joined #ruby
immune has joined #ruby
jameser has joined #ruby
cdg has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
cdg_ has joined #ruby
cdg has quit [Ping timeout: 252 seconds]
marr has joined #ruby
cdg_ has quit [Ping timeout: 252 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has joined #ruby
jameser has quit [Client Quit]
amatas_ has quit [Ping timeout: 240 seconds]
cschnei__ has joined #ruby
jameser has joined #ruby
jaruga has joined #ruby
cschnei__ has quit [Ping timeout: 260 seconds]
apeiros has joined #ruby
mrBen2k2k2k has joined #ruby
blackmesa has joined #ruby
Emmanuel_Chanel has joined #ruby
hahuang65 has quit [Read error: Connection reset by peer]
hahuang65 has joined #ruby
alex`` has quit [Ping timeout: 255 seconds]
bronson has joined #ruby
Beams has joined #ruby
alex`` has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
Emmanuel_Chanel has quit [Ping timeout: 256 seconds]
ana_ has quit [Quit: Leaving]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jsrn has quit [Ping timeout: 240 seconds]
pabs has quit [Ping timeout: 248 seconds]
jsrn has joined #ruby
alfiemax has quit [Remote host closed the connection]
LenPayne has quit [Ping timeout: 255 seconds]
alfiemax has joined #ruby
blackmesa has quit [Ping timeout: 265 seconds]
blackmesa has joined #ruby
guardianx has joined #ruby
phaul has joined #ruby
tomphp has joined #ruby
dhollinger has quit [Ping timeout: 240 seconds]
guardianx has quit [Client Quit]
John___ has joined #ruby
jnyw has quit [Quit: WeeChat 2.0.1]
ramfjord has joined #ruby
LenPayne has joined #ruby
iamarun has quit [Ping timeout: 240 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
iamarun has joined #ruby
ramfjord has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
sameerynho has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kelseynz has joined #ruby
kelseynz has quit [Quit: Leaving]
LenPayne has quit [Ping timeout: 264 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dhollinger has joined #ruby
tomphp has joined #ruby
LocaMocha has quit [Read error: Connection reset by peer]
camilasan has quit [Ping timeout: 260 seconds]
za1b1tsu has joined #ruby
workmad3 has joined #ruby
alex`` has quit [Ping timeout: 252 seconds]
camilasan has joined #ruby
LocaMocha has joined #ruby
kelseynz has joined #ruby
jamesaxl has joined #ruby
ldnunes has joined #ruby
blackmesa has joined #ruby
benjen has quit [Ping timeout: 264 seconds]
bronson has joined #ruby
thinkpad has quit [Ping timeout: 240 seconds]
vtx has joined #ruby
minimalism has quit [Quit: minimalism]
sammi` has quit [Quit: Lost terminal]
alfiemax has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 268 seconds]
thinkpad has joined #ruby
minimalism has joined #ruby
sidx64 has joined #ruby
benjen has joined #ruby
huddy has joined #ruby
sammi` has joined #ruby
alfiemax has joined #ruby
postmodern has quit [Quit: Leaving]
jaruga has quit [Quit: jaruga]
alfiemax has quit [Ping timeout: 240 seconds]
iamarun has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 252 seconds]
kelseynz has quit [Quit: leaving]
LenPayne has joined #ruby
iamarun has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has joined #ruby
biberu has joined #ruby
Cavallari has joined #ruby
Cavallari has quit [Client Quit]
bkxd has joined #ruby
hfp_work has quit [Quit: bye]
alfiemax has quit [Ping timeout: 248 seconds]
jaruga_ has joined #ruby
hfp_work has joined #ruby
alfiemax has joined #ruby
<mikhael_k33hl>
Is there a better way to to code something like this? @rsync_options += ' ' + rsync_delete_options || DEFAULT_RSYNC_DELETE_OPTIONS
hays_ has joined #ruby
sdrew has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Riddell has quit [Ping timeout: 260 seconds]
alfiemax has quit [Remote host closed the connection]
jaruga_ is now known as jaruga
hays has quit [Ping timeout: 252 seconds]
alfiemax has joined #ruby
bkxd_ has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Riddell has joined #ruby
tulivu has joined #ruby
bkxd has quit [Ping timeout: 248 seconds]
alfiemax has quit [Ping timeout: 265 seconds]
alex`` has joined #ruby
iamarun has quit [Remote host closed the connection]
jottr has joined #ruby
jameser has joined #ruby
felipec has quit [Quit: Leaving]
jameser has quit [Client Quit]
jameser has joined #ruby
anisha has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has joined #ruby
<phaul>
mikhael_k33hl: + is higher precedence than || so I think this ccode might have a bug. if rsync_delete_options.nil? then you have ' ' + nil which throws exception
zachary12 has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
<mikhael_k33hl>
phaul: oh yeah, just tried it, haha, silly me
Asher has quit [Quit: Leaving.]
sepp2k has joined #ruby
zachary12 has joined #ruby
tcopeland has quit [Quit: tcopeland]
bronson has quit [Ping timeout: 276 seconds]
anisha has joined #ruby
Asher has joined #ruby
Guest29596 has joined #ruby
Guest29596 has quit [Read error: Connection reset by peer]
<za1b1tsu>
Hello, for a model I have an attribute expire that is an DateTime object, when I try to do Model.new(expire: DateTime.current) in the console, it shows expire nil, but if do Model.new(name:'foo') the name attribute has 'foo' value. Anybody knows why?
ur5us has joined #ruby
<apeiros>
za1b1tsu: activerecord model?
<tobiasvl>
za1b1tsu: this sounds like rails? try #RubyOnRails
drewmcmillan has joined #ruby
<za1b1tsu>
oops my bad
<za1b1tsu>
I thought this was rails channel lol
Gnukpd has joined #ruby
ur5us has quit [Remote host closed the connection]
ramfjord has joined #ruby
jamesaxl has quit [Quit: WeeChat 1.9.1]
dstrunk has joined #ruby
bkxd_ has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 252 seconds]
tomphp has joined #ruby
roshanavand has left #ruby [#ruby]
bkxd has joined #ruby
bkxd has quit [Max SendQ exceeded]
tomphp has quit [Client Quit]
cschneid_ has joined #ruby
rabajaj has quit [Quit: Leaving]
tomphp has joined #ruby
tomphp has quit [Client Quit]
tomphp has joined #ruby
troulouliou_div2 has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
cschneid_ has quit [Ping timeout: 248 seconds]
cabotto has joined #ruby
tomphp has quit [Client Quit]
Gnukpd has quit [Quit: Leaving]
uZiel has quit [Ping timeout: 272 seconds]
alex`` has quit [Ping timeout: 265 seconds]
AJA4350 has joined #ruby
bkxd has joined #ruby
bkxd has quit [Max SendQ exceeded]
LenPayne has quit [Ping timeout: 260 seconds]
bkxd has joined #ruby
dstrunk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apparition has joined #ruby
immune has quit [Ping timeout: 240 seconds]
LenPayne has joined #ruby
Troy2 has joined #ruby
bronson has joined #ruby
bkxd has quit []
bronson has quit [Ping timeout: 255 seconds]
tcopeland has joined #ruby
Mia has quit [Ping timeout: 248 seconds]
mtkd has quit [Ping timeout: 248 seconds]
anisha has quit [Quit: This computer has gone to sleep]
pilne has quit [Quit: Quitting!]
apeiros has quit [Read error: Connection reset by peer]
<hays_>
i want to do gem install xxxx and have a commandline utility that i made put in a path somewhere. is there a tool for this?
blackmesa has joined #ruby
LenPayne has quit [Ping timeout: 276 seconds]
Mia has quit [Read error: Connection reset by peer]
Mia has joined #ruby
<apeiros>
hays_: what's the former got to do with the latter? like this, my answer is "gem install xxx; mv path/to/your/utility path/you/want/to/have/it"
pastorinni has joined #ruby
<hays_>
the utility is the gem
sameerynho has quit [Ping timeout: 248 seconds]
<apeiros>
have a bin dir in your gem, add it to the gemspec properly. rubygems will install it.
<apeiros>
executables and files are the relevant ones for this iirc.
tvw has quit [Remote host closed the connection]
aufi_ has quit [Remote host closed the connection]
cadillac_ has quit [Read error: Connection reset by peer]
quobo has quit [Quit: Connection closed for inactivity]
RougeR has joined #ruby
RougeR has quit [Changing host]
RougeR has joined #ruby
andikr has quit [Remote host closed the connection]
cadillac_ has joined #ruby
pastorinni has quit [Remote host closed the connection]
herbmillerjr has quit [Quit: Konversation terminated!]
pastorinni has joined #ruby
bronson has joined #ruby
oleo has joined #ruby
Burgestrand has quit [Quit: Closing time!]
desperek has joined #ruby
cschneid_ has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 248 seconds]
tulivu has quit [Quit: WeeChat 1.9.1]
selim has quit [Ping timeout: 265 seconds]
Miron has joined #ruby
zy has joined #ruby
selim has joined #ruby
zy has quit [Client Quit]
troys is now known as troys_
zigzig has joined #ruby
conta has quit [Ping timeout: 240 seconds]
MobiBleu has quit [Ping timeout: 255 seconds]
dionysus69 has joined #ruby
depesz has joined #ruby
<depesz>
Hi. I'm opening pipe to write to program, using: f = IO.popen(%w{some program}, 'w'); then i write data to it. but when I try to f.close my program waits for the other program (the one I sent data to) to end. How can I make it "send end of data" to child, but not wait for it to finish?
tomlukeywood has joined #ruby
theRoUS has joined #ruby
MobiBleu has joined #ruby
MobiBleu has quit [Max SendQ exceeded]
TomyWork has quit [Quit: Leaving]
John___ has quit [Read error: Connection reset by peer]
<lcarlson>
havenwood, ya I def watched his talks before
<lcarlson>
Simple made easy is one of my favs
<havenwood>
lcarlson: You might want to read an article Radar is writing too!
jaruga has quit [Quit: jaruga]
* havenwood
peers into the mysterious future
<lcarlson>
havenwood, haha! How will I acquire said future link?
<havenwood>
lcarlson: Roda, dry-rb, and a bunch of other functional-leaning, quality libraries are worth looking at.
rrutkowski has quit [Client Quit]
<havenwood>
Roda has a great pattern that the Sequel gem also shares for plugins.
rrutkowski has joined #ruby
<havenwood>
And dry-rb has a bunch of libraries to get you thinking. ROM is also interesting.
MobiBleu has joined #ruby
MobiBleu has quit [Max SendQ exceeded]
<lcarlson>
dry-rb is awesome looking!
<lcarlson>
havenwood, I'm finding my way back to Ruby after several years of Node programming
<lcarlson>
it's been awhile
<lcarlson>
I stopped after Rails and Merb merged
<havenwood>
lcarlson: There's been a lot of great progress in Ruby while you've been gone.
<lcarlson>
source grapes :)
<lcarlson>
sour*
<lcarlson>
havenwood, I've noticed!
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
<lcarlson>
anything in particular I should be aware of since that time?
kies has quit [Ping timeout: 256 seconds]
<havenwood>
lcarlson: The GC has improved substantially and everything is faster. There're a ton of new methods and features. You should probably check out frozen string literals, since they're widely used now.
<havenwood>
We might get a JIT as early as Christmas. It'll be optionally enabled with a -j flag.
<havenwood>
That's a huge performance win at the cost of a bit of memory.
plexigras has joined #ruby
<lcarlson>
havenwood, do frozen string literals even the score with symbols as far as memory usage then?
<lcarlson>
wow, JIT! crazy
<havenwood>
lcarlson: Yes, and many symbols can be GCed now as well.
<havenwood>
lcarlson: There's also a complete rewrite of YARV underway, converting the IR to RTL. (The JIT that's been chosen came from that work, and can get merged before RTL is done.)
<havenwood>
lcarlson: I'd also recommend looking into TruffleRuby!
<baweaver>
I have been summoned
* havenwood
says "RTL" three times
<baweaver>
more of the gist earlier.
<lcarlson>
oh boo
<havenwood>
baweaver: Oh, the books!
<lcarlson>
"We do run Rails, and pass the majority of the Rails test suite. But we are missing support for OpenSSL, Nokogiri, and ActiveRecord database drivers which makes it not practical to run real Rails applications at the moment."
<havenwood>
Right, right.
<baweaver>
I should update it later.
<lcarlson>
baweaver, great gist btw
aviraldg has quit [*.net *.split]
majoh_ has quit [*.net *.split]
cochi has quit [*.net *.split]
johnny56 has quit [*.net *.split]
FifthWall has quit [*.net *.split]
gremax has quit [*.net *.split]
crayfishx has quit [*.net *.split]
Lyfe has quit [*.net *.split]
heyimwill has quit [*.net *.split]
TheMoonMaster has quit [*.net *.split]
Phage has quit [*.net *.split]
drale2k has quit [*.net *.split]
cybergeeek has quit [*.net *.split]
<baweaver>
danke danke
<lcarlson>
thank you much
Lyfe has joined #ruby
Cybergeek has joined #ruby
cochi has joined #ruby
cochi has quit [Changing host]
cochi has joined #ruby
Phage has joined #ruby
Phage has joined #ruby
majoh_ has joined #ruby
<havenwood>
lcarlson: I do think it's gotten further now than when that was written.
<lcarlson>
bought 3 of those suggestions with one click ;)
<baweaver>
It hides up in the channel topic if you're ever looking for it again
<baweaver>
baweaver on Twitter was a sorority girl. Only reason I know this is because a recruiter thought she was me which led to quite an amusing followup
jottr has quit [Ping timeout: 240 seconds]
jtdoncas has joined #ruby
<lcarlson>
baweaver, hahah! Oh the fun of Internet aliases
Troy2 has quit [Ping timeout: 276 seconds]
<lcarlson>
havenwood, baweaver both followed!
<lcarlson>
lancecarlson
<lcarlson>
what is the best Ruby conf to go to these days?
<lcarlson>
Ruby or Rails?
Ishido has quit [Ping timeout: 256 seconds]
<baweaver>
RubyConf hits LA this year
sundhell_away is now known as sundhell
<baweaver>
RailsConf is always fun, especially whenever you get tenderlove giving a keynote
<lcarlson>
LOL
<lcarlson>
ah I miss those
alex`` has quit [Ping timeout: 252 seconds]
bronson has joined #ruby
<baweaver>
avdi is still giving awesome talks and tutorials, zenspider is still going on Minitest and other SeattleRB projects
k0mpa has joined #ruby
leitz has joined #ruby
Ishido has joined #ruby
<baweaver>
Radar is still Radar
goatish has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<lcarlson>
tpope around anymroe?
<baweaver>
twitter mainly
<baweaver>
giles and zedshaw as well on that note
<lcarlson>
Miss Giles. Haven't seen him in ages
<lcarlson>
Isn't Zed back to python ? :)
zautomata has quit [Read error: Connection reset by peer]
<baweaver>
Zed's dead baby
<lcarlson>
hahaha
<baweaver>
Na, he skips around languages
<lcarlson>
curious if he ever got consulting gigs for Mongrel2
<lcarlson>
I fell in love with the idea
zautomata has joined #ruby
<baweaver>
Reddit has some more of the old guard
zautomata has quit [Read error: Connection reset by peer]
bronson has quit [Ping timeout: 268 seconds]
<lcarlson>
great to see people still here though :)
<baweaver>
sgriff took into Rust and had a kid he named Ruby XD
MobiBleu has joined #ruby
MobiBleu has quit [Max SendQ exceeded]
zautomata has joined #ruby
nowhereman_ has quit [Ping timeout: 240 seconds]
<lcarlson>
baweaver, LOL, I didn't realize he named his kid Ruby
<lcarlson>
I've been listening to Bike Shed for awhile now
<baweaver>
Matz is still awesome as always, and is particularly bent on MRuby (Embedded) currently
nowhereman_ has joined #ruby
<lcarlson>
and super into Rust as well
<lcarlson>
Rust + Ruby <3
<baweaver>
apeiros is still around somewhere
<lcarlson>
technoweenie?
<baweaver>
cirwin stopped popping up on IRC but runs startups now
<baweaver>
not familiar with that one
<lcarlson>
Rick Olson I think his name is
<leah2>
anyone using vagrant with ruby 2.5?
<lcarlson>
I noticed he is a contributor (creator?) of faraday
<lcarlson>
gem
<lcarlson>
wycats?
<baweaver>
became the lord commander of EmberJS
<baweaver>
and patron saint of package managers for languages
<lcarlson>
hahaha
<lcarlson>
yes, crates
<lcarlson>
<3
<baweaver>
Can't say I've used Vagrant in a while
spectra has joined #ruby
sameerynho has joined #ruby
<leah2>
dont use it either, but it depends on <2.5
<alex-tfdc>
!quit
alex-tfdc has quit [Quit: alex-tfdc]
nowhere_man has joined #ruby
marxarelli|afk is now known as marxarelli
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhereman_ has quit [Ping timeout: 268 seconds]
blackmesa has joined #ruby
rrutkowski_ has quit [Quit: rrutkowski_]
rrutkowski has joined #ruby
<tcopeland>
lcarlson: Lance I think we crossed paths back in RubyForge days…
jaruga has joined #ruby
jaruga has quit [Remote host closed the connection]
MobiBleu has joined #ruby
MobiBleu has quit [Max SendQ exceeded]
<lcarlson>
tcopeland, yes! What's uptime Tom??
conceivably has joined #ruby
jottr has joined #ruby
hahuang65 has quit [Read error: Connection reset by peer]
weathermaker has joined #ruby
rrutkowski has quit [Client Quit]
<tcopeland>
same ol same ol man
hahuang65 has joined #ruby
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rrutkowski has joined #ruby
<tcopeland>
rails rails rails
<lcarlson>
tcopeland, love it. Rails 5 has come a long way. I'm a little miffed that I had to bring in webpacker in order to use es6 instead of using sprockets (because I'd rather not use coffeescript)
<lcarlson>
but other than that, no complaints really
jottr has quit [Ping timeout: 260 seconds]
<SuperLag>
I'm having issues installing "fpm" on RHEL 7.2
<conceivably>
Hello. I'm parsing some XML and in the process instantiate a bunch of Ruby classes. Conceptually, all of these classes represent table rows, but they are different kinds of table rows. What kind of row class should be instantiated depends on various factors such as a xml attribute or name. Where should the part of the code go that makes the decision on which class to instantiate? In a parser class that checks the attributes and name of
<conceivably>
the xml node and then instantiates the appropriate subclass, or should I initialize the parent row class with the xml node, which then decides which subclass to instantiate? Or would some other approach be preferable?
blackmesa has joined #ruby
<SuperLag>
baweaver: I thought ruby-libs would have the magic. Looks like I need to enable another repo.
justicefries has quit [Client Quit]
<baweaver>
conceivably: I'd probably put it in a secondary function that the parser calls which would handle distribution to the various classes or errors in the case of an invalid row
<baweaver>
Part of me wants to call that a Hydrate / Dehydrate class
justicefries has joined #ruby
<baweaver>
or serialize / deserialize
blackmesa has quit [Ping timeout: 256 seconds]
jottr has joined #ruby
sundhell is now known as sundhell_away
LocaMocha has quit [Ping timeout: 265 seconds]
jottr has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
MobiBleu has joined #ruby
MobiBleu has quit [Max SendQ exceeded]
s3nd1v0g1us has joined #ruby
John___ has joined #ruby
bkxd has quit [Ping timeout: 256 seconds]
pastorinni has quit [Remote host closed the connection]
pastorinni has joined #ruby
conceivably has quit [Ping timeout: 256 seconds]
fmcgeough has quit [Quit: fmcgeough]
FrostCandy has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
conceivably has joined #ruby
pastorinni has quit [Ping timeout: 264 seconds]
<conceivably>
Sorry baweaver I got disconnected. Yes that sounds like a good idea. I think I will go with that and have a sort of factory class. Thanks again :)
cdg has quit [Ping timeout: 265 seconds]
MobiBleu has joined #ruby
MobiBleu has quit [Max SendQ exceeded]
uZiel has quit [Ping timeout: 272 seconds]
rrutkowski has quit [Ping timeout: 248 seconds]
guille-moe has quit [Ping timeout: 240 seconds]
jamiejackson has joined #ruby
blackmesa has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
guacamole has quit [Client Quit]
krawchyk has joined #ruby
reber has quit [Quit: Leaving]
krawchyk has quit [Client Quit]
bronson has joined #ruby
rrutkowski has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
synthroi_ has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 240 seconds]
amatas_ has quit [Quit: amatas_]
MobiBleu has joined #ruby
MobiBleu has quit [Max SendQ exceeded]
rrutkowski has left #ruby [#ruby]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kloeri has joined #ruby
dionysus69 has joined #ruby
rrutkowski_ has joined #ruby
jeremy04 has quit [Remote host closed the connection]
rrutkowski_ has quit [Client Quit]
huddy has quit [Quit: Connection closed for inactivity]
nopolitica has joined #ruby
rrutkowski has joined #ruby
MobiBleu has joined #ruby
MobiBleu has quit [Max SendQ exceeded]
ltp has quit [Ping timeout: 268 seconds]
conceivably has quit [Ping timeout: 240 seconds]
synthroid has joined #ruby
marxarelli is now known as marxarelli|afk
bmurt has joined #ruby
<tcopeland>
lcarlson: (sorry, I got pulled into a demo) yeah newer Rails are pretty nice, ditto newer Ruby… a lot faster than the bad old 1.8.7 days
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<lcarlson>
tcopeland, remember when fcgi was what we came up with?
rrutkowski has quit [Quit: rrutkowski]
<tcopeland>
haha nice. gotta configure it Apache too, httpd.conf baby
<lcarlson>
tcopeland, eventually we got mongrel and used nginx in the front to compensate for insane memory usage
<lcarlson>
even then, times were still tough for scale
<tcopeland>
yeah there was a whole series of things
<tcopeland>
lighttpd
<lcarlson>
passenger
rrutkowski has joined #ruby
<tcopeland>
let’s get Austin Zieglar in here, the whole gang’s back together
jxv has joined #ruby
<tcopeland>
I met up with Rich Kilmer the other day, he’s mostly doing Elixir now, although some RubyMotion too
<tcopeland>
actually I think he spoke at the past rubyconf too, talked about Rake and Rubygems and all that
<tcopeland>
-rubygems
<lcarlson>
tcopeland, I don't understand this obsession with Elixer
<lcarlson>
Ruby's syntax is so much nicer
<lcarlson>
if you need speed, just use Rust
<lcarlson>
then come back to Ruby
<lcarlson>
:)
weathermaker has quit [Quit: weathermaker]
raynold has quit [Quit: Connection closed for inactivity]
<lcarlson>
at least you def to write underscored functions :)
<lcarlson>
get*
<tcopeland>
yeah ruby is still doing the job for me… if something is slow it’s usually my fault because I’m doing N+1 queries or recalculating something a million times or something
<lcarlson>
tcopeland, well the first one is not even Ruby too! It's the database
ldnunes has quit [Quit: Leaving]
rrutkowski has quit [Client Quit]
<tcopeland>
yeah can’t blame ruby for a missing index or whatevs
<lcarlson>
tcopeland, in fact, instead of Elixer, why not Go? LOL
<baweaver>
your each makes a hash pair into an array
<baweaver>
you need to use two values in that, so `each { |v| ... }` vs `each { |k,v| ... }`
<baweaver>
the second is correct
<baweaver>
but
<baweaver>
you're also doing something else wrong there
<baweaver>
you only want to output the hash information into the file
k0mpa has quit [Ping timeout: 272 seconds]
<TaderFit>
yes
<gizmore>
logic error ftw
<TaderFit>
for bacup
<baweaver>
so what you want to actually do is: File.open('name', 'w') { |f| f.puts "NOM: #{line[:nom]}\tNotes: #{line[:notes]}\tMoyenne: #{isMoyenne}\n" }
<baweaver>
be warned that mode 'w' will erase the current file
<baweaver>
you likely want append instead
<TaderFit>
no i wanqt to add so its 'a' and i remove 'w'
<baweaver>
'a'
<baweaver>
yep
<TaderFit>
its corecte?
<TaderFit>
and
nadir has joined #ruby
<TaderFit>
can i use stdin.flush
<baweaver>
why?
postmodern has joined #ruby
<TaderFit>
because when i want to get value of second chose i muste type tow time 2
<baweaver>
you're also using gets.chomp wrong
<baweaver>
you want to save it in a variable at the top
<baweaver>
otherwise you're constantly getting a new value
<TaderFit>
ok
<TaderFit>
so if i want send the value i must save it in variable
<baweaver>
also you really need to fix indentation
ramfjord has joined #ruby
<leah2>
can i do a access(2) syscall from ruby?
<TaderFit>
ok thank you bro thank so much
<TaderFit>
im will rewrite this now
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
rrutkowski_ has joined #ruby
guille-moe has quit [Ping timeout: 256 seconds]
jeffreylevesque has joined #ruby
rrutkowski has quit [Ping timeout: 255 seconds]
ramfjord has quit [Ping timeout: 276 seconds]
kapil___ has joined #ruby
nopolitica has quit [Ping timeout: 240 seconds]
rrutkowski_ has quit [Client Quit]
alfiemax has quit [Remote host closed the connection]
han` has joined #ruby
ur5us has quit [Ping timeout: 256 seconds]
tcopeland has quit [Quit: tcopeland]
rrutkowski has joined #ruby
jeffreylevesque_ has joined #ruby
jeffreylevesque has quit [Ping timeout: 256 seconds]
danguita has quit [Ping timeout: 240 seconds]
rrutkowski has quit [Client Quit]
danguita has joined #ruby
amatas has quit [Quit: amatas]
rrutkowski has joined #ruby
pastorin_ has joined #ruby
jamiejackson has quit [Remote host closed the connection]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Azure has quit [Read error: Connection reset by peer]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
Azure has joined #ruby
cdg has quit [Remote host closed the connection]
pastorinni has quit [Ping timeout: 276 seconds]
cdg has joined #ruby
jtdoncas has joined #ruby
<Trel>
Stazer: -i specifies the install directory I'm installing TO or FROM?
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
Dimik has joined #ruby
<Stazer>
seems like it specified FROM
cdg has quit [Ping timeout: 256 seconds]
<Stazer>
*specifies
jeffreylevesque has joined #ruby
jtdoncas has quit [Ping timeout: 256 seconds]
herbmillerjr has joined #ruby
FrostCandy has quit []
jeffreylevesque_ has quit [Ping timeout: 256 seconds]
guacamole has quit [Client Quit]
plexigras has quit [Ping timeout: 252 seconds]
plexigras has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
immune has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]