Snowy has quit [Remote host closed the connection]
hahuang61 has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Rickmasta has joined #ruby
hahuang65 has quit [Ping timeout: 264 seconds]
Devalo has quit [Ping timeout: 240 seconds]
bob434 has quit [Quit: This computer has gone to sleep]
Pumukel has quit [Ping timeout: 250 seconds]
ngscheur1 has quit [Ping timeout: 264 seconds]
smathy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jackjackdripper has quit [Quit: Leaving.]
nitric has quit [Ping timeout: 265 seconds]
hahuang65 has joined #ruby
smathy has joined #ruby
bob434 has joined #ruby
kus has joined #ruby
kus has quit [Max SendQ exceeded]
ramfjord has joined #ruby
byteflame has quit [Ping timeout: 276 seconds]
RiPuk has quit [Ping timeout: 244 seconds]
rkazak has quit [Quit: Sleep.....ing....]
aries_liuxueyang has joined #ruby
nettoweb has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aegis3121 has quit [Ping timeout: 276 seconds]
<ICantCook>
if I have a string '-a test -b something', is there a way I can run the OptionsParser on it?
ta_ has joined #ruby
<ICantCook>
this string is stored in a variable
duderonomy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Lucky_ABA has joined #ruby
<monoprotic>
cant you use the parse method
duderonomy has joined #ruby
RedNifre_ has quit [Read error: Connection reset by peer]
RedNifre_ has joined #ruby
Vingador has joined #ruby
ekinmur has joined #ruby
ta has quit [Ping timeout: 250 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
saneax is now known as saneax-_-|AFK
tvon[laptop] has quit [Quit: Peace out, y'all!]
<ICantCook>
got it working with this hack: ARGV=mystring.split(' ')
aupadhye has joined #ruby
BTRE has quit [Read error: Connection reset by peer]
BTRE has joined #ruby
shinnya has quit [Ping timeout: 240 seconds]
sneakerhax has joined #ruby
astrobun_ has joined #ruby
aupadhye has quit [Ping timeout: 252 seconds]
rsampaio_ has quit [Ping timeout: 260 seconds]
ta has joined #ruby
_panpainter has quit [Remote host closed the connection]
SteenJobs has joined #ruby
CrazyEddy has joined #ruby
ta has quit [Ping timeout: 265 seconds]
aupadhye has joined #ruby
przemoskPL has quit [Quit: przemoskPL]
aryaching has joined #ruby
meth has quit [Quit: Leaving]
ta has joined #ruby
przemoskPL has joined #ruby
ramfjord has quit [Ping timeout: 258 seconds]
ta_ has quit [Ping timeout: 276 seconds]
ddffg has quit [Ping timeout: 265 seconds]
charliesome has joined #ruby
przemoskPL has quit [Client Quit]
panpainter has joined #ruby
duderonomy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pumukel has joined #ruby
arnonhongklay has joined #ruby
AlexRussia has quit [Ping timeout: 265 seconds]
hahuang65 has quit [Ping timeout: 258 seconds]
wldcordeiro has joined #ruby
chestnutpie has quit [Quit: Leaving]
gnufied has quit [Quit: Leaving]
eljimbo has joined #ruby
Pumukel has quit [Ping timeout: 244 seconds]
ta_ has joined #ruby
floatingpoint_ has joined #ruby
<floatingpoint_>
hey. im trying to invoke a module function from within a file that contains a module. is this incorrect? http://hastebin.com/jifelabaxu.rb
arnonhongklay has quit [Ping timeout: 276 seconds]
panpainter has quit [Ping timeout: 252 seconds]
ta has quit [Ping timeout: 252 seconds]
Ropeney has joined #ruby
CloCkWeRX has joined #ruby
mostlybadfly has joined #ruby
l4v2 has quit [Quit: l4v2]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
waht has joined #ruby
shiver has quit [Remote host closed the connection]
shiver has joined #ruby
shiver has joined #ruby
shiver has quit [Changing host]
ta has joined #ruby
astrobun_ has quit [Remote host closed the connection]
<baweaver>
quazimodo: Why not ask in the rails channel?
<baweaver>
Also using exceptions that heavily for flow control is a bad call.
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
ta_ has joined #ruby
nettoweb has quit [Client Quit]
LoneHerm_ has joined #ruby
nankyokusei has quit [Ping timeout: 244 seconds]
brent__ has joined #ruby
pokalyis has joined #ruby
ta has quit [Ping timeout: 250 seconds]
<baweaver>
Follow after what Rails already does with ActiveRecord models. Exceptions should be used for exceptional behavior that's considered abnormal
<baweaver>
(though really I'm in the camp of outright avoiding exceptions where possible)
tjohnson has quit [Quit: Connection closed for inactivity]
k3rn31 has quit [Quit: Computer has gone to sleep.]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
LoneHerm_ has quit [Remote host closed the connection]
pokalyis has joined #ruby
tdy has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Junaos has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
Junaos has joined #ruby
JoshS has quit [Ping timeout: 255 seconds]
itsabear has joined #ruby
dunpeal has quit [Ping timeout: 244 seconds]
<itsabear>
hi, how to make rvm autoload the ruby in every shell session opened?
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<itsabear>
on Linux
pokalyis has joined #ruby
spudowiar has quit [Quit: zzzzzz]
JoshS has joined #ruby
hahuang65 has joined #ruby
<baweaver>
itsabear Did you follow the instructions?
AndyBotwin has quit [Ping timeout: 250 seconds]
mania has quit [Ping timeout: 276 seconds]
dunpeal has joined #ruby
<itsabear>
yes, 1. get the gpg 2. install the rvm using curl with --dot something flag, I got rvm running and is a function, however there's no Ruby to run.
<baweaver>
Did you put it in your bash profile?
AndyBotwin has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dminuoso has joined #ruby
jaruga___ has joined #ruby
pokalyis has joined #ruby
jaruga___ is now known as jaruga_____
unforgiven512 has joined #ruby
arnonhongklay has quit [Ping timeout: 276 seconds]
jaguarmagenta has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pokalyis has joined #ruby
jaguarmagenta has quit [Ping timeout: 260 seconds]
Pumukel has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
newdev has joined #ruby
<newdev>
hi
<dminuoso>
?hi
<ruby[bot]>
dminuoso: I don't know anything about hi
* dminuoso
kicks ruby[bot]
<newdev>
lmao
<newdev>
?lmao
<newdev>
...
<nofxx>
use the force luke
rkazak has quit [Quit: Sleep.....ing....]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<nofxx>
darn wicked pdf, dunno how to make it use xvfb
<nofxx>
dminuoso, italian?
vondruch has joined #ruby
<newdev>
can i ask "dashing" questions here?
charliesome has joined #ruby
<nofxx>
it's the sinatra big numbers and stats app no?
Pumukel has quit [Ping timeout: 260 seconds]
<newdev>
yes!
<nofxx>
guess so, if it's not rails no one will use guns
<newdev>
:P
<TheBrayn>
I think they have their own irc-channel
<TheBrayn>
ok not really
<nofxx>
you shot
<nofxx>
hehe... but yeah, that was the joke
Edward__ has joined #ruby
<nofxx>
ah, sorry, taught you meant rails TheBrayn
TomyWork has joined #ruby
A_Drone has joined #ruby
<newdev>
I'm new to web dev but I got a project passed on from my boss. Apparently it stopped running months ago and he doesn't remember why. Where can I look in the server to start it again?
<newdev>
start dashing ... didn't work
<nofxx>
thought.. always confuse those
pokalyis has joined #ruby
<newdev>
it's really a long shot asking here
edwinvdgraaf has joined #ruby
<nofxx>
newdev, check the terminal history.. best guess
<newdev>
i did...
<nofxx>
cuz it's up to you that part
<nofxx>
init.d ?
<newdev>
i will keep poking
govg has quit [Quit: leaving]
pokalyis has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
ccmcdee has joined #ruby
<nofxx>
newdev, least one expect is that he made it reboot somehow
<nofxx>
I mean, start on reboot*
xue has joined #ruby
pokalyis has joined #ruby
meatchicken has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: Ex-Chat]
vondruch has joined #ruby
<newdev>
nofxx that is very true, I'm surfing through the init files
LoneHerm_ has quit [Remote host closed the connection]
<dminuoso>
nofxx: No. Not in the slightest.
<newdev>
why
<newdev>
watsup
<dminuoso>
nofxx: My name is just a homage for the role Italian language plays in classical music.
dbck has joined #ruby
Coldblackice has quit [Ping timeout: 260 seconds]
<dminuoso>
newdev: What kind of project is it? Rails? Rack? Something else?
pokalyis has quit [Client Quit]
CloCkWeRX has left #ruby [#ruby]
<dminuoso>
newdev: If it's web related, there is a big chance you have a separate HTTP server and a local ruby application server (e.g. nginx -> puma). The first thing I would look for is any configured sites in your nginx/apache configuration - if its there.
djbkd has quit [Ping timeout: 252 seconds]
pokalyis has joined #ruby
<newdev>
dminuoso: I'm trying to understand as much as I can from your explanation. The situation is that the website had a one button that linked to this "dashing" project that was launched on a seperate server that the rest of the website
<newdev>
and that linke/page is now not working
<newdev>
oh actually!
<dminuoso>
newdev: Most rails servers usually have an nginx (or apache) part that handles TLS, and then passes the traffic onto a puma server (through unix domain sockets often).
<newdev>
thanks, I will do some more searching
<dminuoso>
newdev: So start looking in /etc/nginx/sites-enabled and /etc/apache/sites-enabled
<newdev>
no /etc/nginx
A_Drone has quit [Remote host closed the connection]
<ICantCook>
in a ruby cli script, I want to be able to get the name of the script executed by a user from the shell
<newdev>
no /etc/apache
<ICantCook>
I've been using __FILE__ and it's been great
djbkd has joined #ruby
A_Drone has joined #ruby
vdamewood has quit [Quit: Life beckons.]
<ICantCook>
but now I'm trying to access it from within another script, which is loaded by the first script
<dminuoso>
newdev: Look for where the application is installed.
<ICantCook>
I still want to get the 'parent' script's name
<ICantCook>
how do I do this?
<dminuoso>
ICantCook: Pass it as an argument into the second script?
Devalo has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<matthewd>
ICantCook: You want $0
mark_66 has joined #ruby
pokalyis has joined #ruby
<ICantCook>
Ah, thanks matthewd
<ICantCook>
that did it
gingray has joined #ruby
Affix has quit [Excess Flood]
Affix has joined #ruby
Affix is now known as Guest52983
bathtub_shark has quit [Ping timeout: 260 seconds]
nankyokusei has joined #ruby
nankyokusei has quit [Remote host closed the connection]
<_mak>
I'm using https://github.com/jekyll/classifier-reborn to classify phrases into ~100 different categories (using LSI). But the learning is getting veeery slow as the learning dataset increases (it is around ~2000 phrases now). I wonder if there's a pattern I could use to optimize the learning process?
RiPuk has joined #ruby
mikecmpbll has joined #ruby
ta has quit [Ping timeout: 260 seconds]
juanfra has joined #ruby
Guest19196 has joined #ruby
jaiks1 has quit [Ping timeout: 244 seconds]
yardenbar has quit [Ping timeout: 244 seconds]
RiPuk has quit [Ping timeout: 240 seconds]
A_Drone has joined #ruby
panpainter has joined #ruby
Immune has joined #ruby
bsrd has joined #ruby
ferr has joined #ruby
Guest19196 is now known as marr
<manveru>
_mak: with GSL?
maloik has joined #ruby
<_mak>
manveru: yeah, I'm using it
smathews has joined #ruby
alfiemax has quit [Ping timeout: 258 seconds]
<manveru>
and you're sure it's actually using it?
raeoks has joined #ruby
panpainter has quit [Ping timeout: 252 seconds]
blaxter has joined #ruby
<_mak>
manveru: I am, the difference in the speed before and after was noticeable :)
ddffg has joined #ruby
DoubleMalt has joined #ruby
<manveru>
alright :)
devbug has joined #ruby
<_mak>
manveru: I'm trying to think of a way to make it faster without throwing more computing power at it... the learning gets progressively slower as it goes deeper into the data set
<manveru>
ok... i've only done bayesian classifiers until now, but LSI sounds expensive as hell
<_mak>
manveru: it is... I was using bayesian until I tried LSI, and for our task LSI is much better
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<manveru>
i can imagine, but if it needs to compare a document to all others... that's just gonna be insane
<manveru>
especially in ruby
flying has joined #ruby
<manveru>
in theory GSL should help with that a lot... but i assume the storage is still happening in ruby objects
jgt2 has joined #ruby
<_mak>
yeah
<_mak>
and the object will get BIG
<manveru>
how much memory do you have?
<_mak>
16gb
<manveru>
and it's using how much?
<_mak>
8gb not
<_mak>
now
<_mak>
but 4 out of 8 cpus are at 100%
<manveru>
you could maybe try it on jruby...
quazimodo has quit [Ping timeout: 244 seconds]
<dminuoso>
_mak: Id be very curious on how this performs using jruby+truffle
<_mak>
manveru: yeah, I tried that at the beggining but it was hard to get all the dependencies working
<dminuoso>
_mak: (becuase this seems to be a thing that truffle should be downright excellent at optimizing)
<_mak>
dminuoso: hmm, let me check it out...
blaxter has quit [Quit: foo]
<_mak>
dminuoso: do you think that the improvement would be worth the time to set it up?
<_mak>
I mean, what could I expect vs normal ruby
<_mak>
10x?
<manveru>
i doubt anybody knows for sure...
<dminuoso>
_mak: Some benchmarks have shown jruby+truffle to perform 10-30 times faster than CRuby in some cases.
dionysus69 has quit [Quit: dionysus69]
<_mak>
well, yeah, that motivates me enought to try it out
<_mak>
:)
<_mak>
thanks guys, I'll give it a try
dionysus69 has joined #ruby
ferr has quit [Quit: WeeChat 1.5]
<manveru>
otherwise, you can always rewrite it in go ;)
<_mak>
do you guys think that it could help if I split the learning to multiple objects each with a group of 100 items and then I merge the objects later? I wonder if the learning of one object will take the already learnt stuff into consideration...
dionysus69 has quit [Client Quit]
dionysus69 has joined #ruby
eam_ has quit [Ping timeout: 244 seconds]
JoshS has joined #ruby
dionysus69 has quit [Client Quit]
astrobun_ has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
jshjsh has quit [Ping timeout: 265 seconds]
dionysus69 has quit [Client Quit]
eam has joined #ruby
agit0 has joined #ruby
anisha has joined #ruby
quazimodo has joined #ruby
<manveru>
maybe check what the exported object looks like for two different sets
A_Drone has quit [Remote host closed the connection]
<mikecmpbll>
awh, logs are down
quazimodo has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
pandaant has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vdamewood has joined #ruby
Dimik has quit [Ping timeout: 265 seconds]
ferr has joined #ruby
dionysus69 has quit [Client Quit]
dionysus69 has joined #ruby
aidalgol has quit [Quit: brb...]
A_Drone has joined #ruby
A_Drone has quit [Remote host closed the connection]
A_Drone has joined #ruby
dionysus69 has quit [Client Quit]
dionysus69 has joined #ruby
Pumukel has quit [Remote host closed the connection]
ixti has quit [Ping timeout: 244 seconds]
aidalgol has joined #ruby
Snowy has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
indistylo has joined #ruby
quazimodo has joined #ruby
agit0 has quit [Quit: I'm off]
ta_ has quit [Ping timeout: 265 seconds]
ta has joined #ruby
Zggb has quit [Quit: Connection closed for inactivity]
hahuang65 has joined #ruby
devbug has quit [Quit: ZZZzzz…]
Beams has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
Macaveli has joined #ruby
nofxx has quit [Ping timeout: 240 seconds]
smathews has quit [Quit: Leaving.]
grimel has joined #ruby
mtkd has quit [Ping timeout: 258 seconds]
nofxx has joined #ruby
nofxx has joined #ruby
nofxx has quit [Changing host]
charliesome has joined #ruby
<grimel>
Hi, all. I'm a Python/Django developer. I'd like to try RoR and I'm looking for something like "RoR by examples". Is there any good resource, you could recommend?
mtkd has joined #ruby
bascht1 has joined #ruby
<mikecmpbll>
grimel : lesson 1) please call it rails
<grimel>
mikecmpbll: got it. First lesson done.
<mikecmpbll>
just a pet hate of mine :p
<grimel>
lesson 2) look at lesson 1 ? :)
naftilos76 has joined #ruby
<dminuoso>
?rails grimel
<ruby[bot]>
grimel: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
arnonhongklay has quit [Remote host closed the connection]
<dminuoso>
James123: Already looking at it. Are you using a version manager?
pokalyis has joined #ruby
<dminuoso>
James123: Are you perhaps attempting to use ruby-fifo in a bundled app?
infernix has quit [Ping timeout: 260 seconds]
<James123>
No, I don't think so. I have a ruby installation through the Arch linux package manager. I want just to test it on irb for start, not sure what a bundled app is :)
<dminuoso>
James123: Okay, I just noticed the subtlety in the error.
Immune has quit [Ping timeout: 252 seconds]
naftilos76 has quit [Read error: Connection reset by peer]
naftilos76 has joined #ruby
<dminuoso>
And I can reproduce your issue even. o_o
the_drow has quit [Read error: Connection reset by peer]
<dminuoso>
Well, considering the triviality of the gem, its not even worth fixing.
<James123>
Burgestrand, dminuoso thank you both!
<Burgestrand>
Looks like the author forgot to include the actual file in the gem distribution. :)
the_drow has joined #ruby
Devalo has joined #ruby
jazzonmym11nd has quit [Ping timeout: 255 seconds]
jlyndon has quit [Ping timeout: 276 seconds]
anisha has quit [Quit: This computer has gone to sleep]
nofxx has quit [Ping timeout: 258 seconds]
<Burgestrand>
FYI James123, File.mkfifo is in ruby core library since ruby 2.3.0.
Dobler has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Burgestrand>
Not much documentation on it though unfortunately, and it relies completely upon `mkfifo`. From the little I looked at ruby-fifo it might be more cross-platform compatible.
jlyndon has joined #ruby
<Burgestrand>
Oh, never mind, it looks like ruby-fifo is not named pipes, never mind about mkfifo then.
cyphactor has quit [Ping timeout: 276 seconds]
pwnd_nsfw has joined #ruby
craigp_ has joined #ruby
<Burgestrand>
Actually, never mind, it does use mkfifo. I should go to lunch. Blerg.
jazzonmym11nd has joined #ruby
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
the_drow has quit [Read error: Connection reset by peer]
pwnd_nsfw` has quit [Ping timeout: 250 seconds]
yfeldblum has joined #ruby
nettoweb has joined #ruby
Devalo has quit [Ping timeout: 255 seconds]
the_drow has joined #ruby
indistylo has quit [Remote host closed the connection]
gnufied has joined #ruby
Puffball has quit [Remote host closed the connection]
astrobu__ has quit [Remote host closed the connection]
gnufied has quit [Client Quit]
gnufied has joined #ruby
dreamyspell is now known as Guest78924
dreamyspell has joined #ruby
cyphactor has joined #ruby
anisha has joined #ruby
pawnbox_ has joined #ruby
conta has joined #ruby
conta has quit [Client Quit]
shmuli has quit [Remote host closed the connection]
bob434 has quit [Quit: This computer has gone to sleep]
Guest78924 has quit [Ping timeout: 252 seconds]
the_drow has quit [Read error: Connection reset by peer]
shmuli has joined #ruby
infernix has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
jshjsh has joined #ruby
the_drow has joined #ruby
ec0 has quit [Ping timeout: 255 seconds]
rodfersou has joined #ruby
bob434 has joined #ruby
Puffball has joined #ruby
JoshS has quit [Ping timeout: 265 seconds]
bob434 has quit [Client Quit]
ta_ has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
sdothum has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
Azure has quit [Quit: Oops.]
ta has quit [Ping timeout: 264 seconds]
the_drow has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
ta_ has quit [Quit: Leaving...]
the_drow has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
shmuli has quit [Remote host closed the connection]
the_drow has quit [Client Quit]
shmuli has joined #ruby
marr has quit [Ping timeout: 240 seconds]
ta has joined #ruby
rsampaio_ has quit [Ping timeout: 264 seconds]
shmuli has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
sand-bird has joined #ruby
pawnbox_ has quit [Ping timeout: 252 seconds]
StoBrendo has quit [Ping timeout: 265 seconds]
lightheaded has quit [Remote host closed the connection]
jaguarmagenta has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sand-bird has quit [Ping timeout: 276 seconds]
Ishido has quit [Read error: Connection reset by peer]
dunpeal has joined #ruby
hahuang65 has joined #ruby
Azure has joined #ruby
naftilos76 has quit [Quit: Αποχώρησε]
lightheaded has joined #ruby
jaguarmagenta has quit [Ping timeout: 240 seconds]
zipace has quit [Ping timeout: 240 seconds]
lightheaded has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 265 seconds]
djbkd has quit [*.net *.split]
bjmllr has quit [*.net *.split]
Ropeney has quit [*.net *.split]
Lucky_ABA has quit [*.net *.split]
coolboy has quit [*.net *.split]
flopsec has quit [*.net *.split]
philtr has quit [*.net *.split]
Asher has quit [*.net *.split]
faces has quit [*.net *.split]
wildleaf has quit [*.net *.split]
tristanp has quit [*.net *.split]
kith has quit [*.net *.split]
Tharbakim has quit [*.net *.split]
awk_ has quit [*.net *.split]
parus has quit [*.net *.split]
madhatter has quit [*.net *.split]
xpt has quit [*.net *.split]
phantummm has quit [*.net *.split]
Satyajit has quit [*.net *.split]
existensil has quit [*.net *.split]
gypsydave5 has quit [*.net *.split]
cfloare has quit [*.net *.split]
jidar has quit [*.net *.split]
KillerFox has quit [*.net *.split]
lucas has quit [*.net *.split]
webhat has quit [*.net *.split]
forgot has quit [*.net *.split]
mame3 has quit [*.net *.split]
indistylo has joined #ruby
coolboy has joined #ruby
Ropeney has joined #ruby
philtr has joined #ruby
Lucky_ABA has joined #ruby
tristanp has joined #ruby
Asher has joined #ruby
parus has joined #ruby
faces has joined #ruby
Satyajit has joined #ruby
cfloare has joined #ruby
madhatter has joined #ruby
phantummm has joined #ruby
jidar has joined #ruby
bjmllr has joined #ruby
awk_ has joined #ruby
wildleaf has joined #ruby
lucas has joined #ruby
xpt has joined #ruby
kith has joined #ruby
tux2 has joined #ruby
existensil has joined #ruby
mame3 has joined #ruby
gypsydave5 has joined #ruby
Tharbakim has joined #ruby
KillerFox has joined #ruby
webhat has joined #ruby
forgot has joined #ruby
tristanp has quit [Max SendQ exceeded]
tux2 has quit [Max SendQ exceeded]
tristanp has joined #ruby
tux2 has joined #ruby
hanmac has quit [Ping timeout: 255 seconds]
lightheaded has joined #ruby
banisterfiend has joined #ruby
Vingador has joined #ruby
arnonhongklay has joined #ruby
hogetaro has joined #ruby
dionysus69 has joined #ruby
bascht1 has quit [Quit: WeeChat 1.5]
arnonhongklay has quit [Read error: Connection reset by peer]
meth has joined #ruby
arnonhongklay has joined #ruby
meth has left #ruby [#ruby]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
Xentil has joined #ruby
vdamewood has quit [Quit: Life beckons.]
indistylo has quit [Remote host closed the connection]
vdamewood has joined #ruby
hanmac has joined #ruby
gizmore has joined #ruby
Zggb has quit [Quit: Connection closed for inactivity]
last_staff has joined #ruby
nankyokusei has joined #ruby
ldnunes has joined #ruby
nettoweb has quit [Read error: Connection reset by peer]
lightheaded has quit [Remote host closed the connection]
gizmore has quit [Remote host closed the connection]
Devalo has joined #ruby
Bish has quit [Ping timeout: 255 seconds]
umdstu has joined #ruby
minimalism has quit [Quit: minimalism]
Bish has joined #ruby
Tempesta has joined #ruby
arnonhon_ has joined #ruby
arnonhongklay has quit [Ping timeout: 244 seconds]
Devalo has quit [Ping timeout: 264 seconds]
Beams has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
WSO has joined #ruby
daivyk has joined #ruby
Rickmasta has joined #ruby
<jonadab>
Is there documentation I could be using to learn the Ruby language, that wouldn't feel like it's teaching me extremely basic programming concepts that everyone already knows, like what a variable is? I mean, I'm highly fluent in Perl5, conversant in elisp and Inform, used to be fluent in QBasic, maintain a NetHack variant in C, ...
<jonadab>
I don't need to learn what a loop is. But I want to learn Ruby.
<dminuoso>
jonadab: There is some great books around.
Lucky_ABA has quit [Read error: Connection reset by peer]
<bhaak>
given your set of programming languages, it might even be better to start from the beginning
<bhaak>
ruby uses some concepts that are not in that programming languages so you might miss some of those features (I'm thinking of blocks for example)
<dminuoso>
jonadab: But let's start with the most important bit:
<dminuoso>
Which NetHack variant did you maintain?
<jonadab>
dminuoso: NetHack Fourk.
<bhaak>
they are quite fundamental in Ruby (borrowed from smalltalk) but not clearly available in those languages you listed
<bhaak>
which is a fork of NetHack4 which is a fork of NetHack
<jonadab>
Oooh, Smalltalk. That's been on my list of interesting languages I probably should look at for a while.
<jonadab>
Actually, NetHack4 is a variant of NitroHack, but yeah.
<jonadab>
Indirectly it's all based on NetHack 3.4.3, with... changes.
<bhaak>
well, UI is based on NitroHack, gaming engine is mostly mashed up vanilla
<dminuoso>
jonadab: Well, the question of whether we find a good book for you depends on this: Is this fork much harder than NetHack? Because I'm more of an Adom guy - Ascension in NetHack is way too easy.
<bhaak>
NH4 fixed all of the atrocities NitroHack did to the vanilla code, though
<jonadab>
Fortunately for me, one of the changes is that NH4 is updated to mostly be in the intersection of C99 and Gnu89 or something like that, so I don't have to deal with all that pre-ANSI C that 3.x uses.
<jonadab>
dminuoso: Fourk is probably easier than vanilla NetHack, overall.
<jonadab>
Sorry :-(
<dminuoso>
jonadab: I'm not sure there is a decent book for you..
<dminuoso>
(:
<jonadab>
Heh.
lightheaded has joined #ruby
<jonadab>
Wait, what if I said that I added some very very hard tracked conducts, including "You never applied a tool"?
<dminuoso>
jonadab: An introductionary book that mostly focuses on the language itself is "Well Grounded Rubyist" - you can easily just skim through the sections explaining basic concepts.
<dminuoso>
Might not be the best recommendation, but its one at least.
lightheaded has quit [Remote host closed the connection]
<dminuoso>
jonadab: Honestly the thing I just loved about Adom was the fact that even the beginning was non-linear. You could freely chose how to spend the first thousand moves. Go into the infinite cave, or somewhere else.
pawnbox has quit [Remote host closed the connection]
<dminuoso>
*infinite dungeo
<jonadab>
dminuoso: Hmm. NetHack has a _little_ of that (players are firmly divided on whether it's better to go Mines first or Sokoban first)...
<jonadab>
Although, the Mines entrance is 2-3 dungeon levels down from the starting point, so you do have to be able to survive contact with newts and possibly lichens, to get there.
<dminuoso>
jonadab: well in adom you start off in the open world. you basically have about half a dozen sensible ways of starting, and twice as much if you like to play it risky.
<jonadab>
Open world, meaning the surface, dungeon level 0 as it were?
<bhaak>
only bad players argue about that. the good players know that you go first to wherever your character needs are better satisfied and might be ping-ponging between those branches
<dminuoso>
jonadab: Yeah.
<jonadab>
bhaak: Well, yes, it does depend somewhat on role. And maybe on race and alignment.
<dminuoso>
jonadab: and compared to nethack adom is extremely brutal in survival. Even the safest options will usually kill you about half the time on your first 10 levels.
bascht1 has quit [Quit: WeeChat 1.5]
<jonadab>
dminuoso: Interesting. I've always wondered if it would be worthwhile for a NetHack variant to start the character out even weaker, on the surface, and you can only enter the Dungeons of Doom once, so prepare well...
lightheaded has joined #ruby
<jonadab>
dminuoso: I think most roguelikes are more brutal in terms of survival than NetHack.
<jonadab>
I am still trying to figure out how to survive in DCSS. And Brogue is... well, it's clearly harder than NetHack.
<dminuoso>
jonadab: From the roguelikes I have tried, adom has the highest brutality potential - which is why I played it mostly.
<jonadab>
I haven't really tried Angband.
<jonadab>
Or any of its plethora of variants.
<jonadab>
I suppose some day I will.
lightheaded has quit [Remote host closed the connection]
<dminuoso>
jonadab: for example if you kill a monster, all other monsters of that type will gain experience.
<dminuoso>
but they gain experience faster than you do.
<dminuoso>
which in case of certain things (jackals come to mind) can quickly be really problematic if you kill too many of them.
<jonadab>
Oh, another thing I implemented in Fourk: extra impairment options. NH4 already had permablind and permahallu; Fourk adds (in 4.3.0.4, which is not on the public server yet...) permaconfused, permastunned, permanent wounded legs, permanent greasy fingers, ...
bascht1 has joined #ruby
bascht1 has quit [Client Quit]
yfeldblum has quit [Ping timeout: 250 seconds]
bascht1 has joined #ruby
<jonadab>
But for just regular play, the base difficulty is comparable to vanilla.
<jonadab>
Though some players have complained about island nymphs and deep ettins.
tvw has quit [Remote host closed the connection]
<jonadab>
I think that's just grousing though; they seem balanced to me.
antgel has joined #ruby
Bish has quit [Ping timeout: 265 seconds]
Snowy has quit [Remote host closed the connection]
arnonhon_ has quit [Read error: Connection reset by peer]
Beams has joined #ruby
<jonadab>
_One_ of the things I am contemplating using as a learning project in Ruby is a small roguelike (nothing as elaborate as NetHack, because I don't want to spend thirty years writing it).
Bish has joined #ruby
arnonhongklay has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
Darkwater has quit [Changing host]
Darkwater has joined #ruby
panpainter has joined #ruby
CloCkWeRX has joined #ruby
lightheaded has joined #ruby
lightheaded has quit [Remote host closed the connection]
GinoManWrx has joined #ruby
marr has joined #ruby
panpainter has quit [Ping timeout: 264 seconds]
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
AndyBotwin has quit [Quit: Leaving]
malconis has joined #ruby
borodin has quit [Ping timeout: 244 seconds]
swills has quit [Ping timeout: 260 seconds]
nofxx has joined #ruby
koooge has quit [Quit: Leaving...]
RodrigoEduardo__ has joined #ruby
blackgoat has quit [Quit: WeeChat 1.5]
Hyuk has joined #ruby
wldcordeiro has quit [Ping timeout: 250 seconds]
lightheaded has joined #ruby
quazimod1 has joined #ruby
quazimodo has quit [Ping timeout: 265 seconds]
rvaldes has quit [Ping timeout: 244 seconds]
robnester has joined #ruby
Burgestrand has joined #ruby
Snowy has joined #ruby
jphase has joined #ruby
sdwrage has quit [Quit: Leaving]
Vacuum_ has quit [Remote host closed the connection]
ltd has quit [Read error: Connection reset by peer]
<moogz>
http://pastebin.com/WyC6A3Gd i've got an easy one - i'd like my script to output to a file instead of stdout, but no idea on how to insert that
<ruby[bot]>
moogz: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
ShummmardeNIK has joined #ruby
lightheaded has quit [Remote host closed the connection]
<moogz>
(noted - would anyone like to help me even with a pastebin?:)
pawnbox has quit [Ping timeout: 260 seconds]
astrobun_ has quit [Remote host closed the connection]
pandaant has quit [Remote host closed the connection]
ramortegui has joined #ruby
<Mon_Ouie>
$stdout.reopen "output_name", or assigning to $stdout if you want to be able to use the original $stdout later
coolboy has quit [Ping timeout: 244 seconds]
jaguarmagenta has quit [Ping timeout: 260 seconds]
hahuang65 has quit [Ping timeout: 255 seconds]
<moogz>
thanks guys. if i were to use logger, what syntax would i insert into my script? i'm brand new to ruby so it's an insertion i'm unclear on where to place
Robtop__ has joined #ruby
arnonhongklay has quit [Ping timeout: 276 seconds]
<dminuoso>
moogz: You would keep some logger object around (that is configured somewhere else), and just use logger.info "stuff happened", or logger.error "things broke"
<moogz>
what i'd like to do is output to a file instead of stdout, and the data to output is always changing so won't be a straightforward message
rippa has joined #ruby
jazzonmym11nd has quit [Ping timeout: 240 seconds]
symm- has joined #ruby
Vingador_ has joined #ruby
arnonhongklay has joined #ruby
<dminuoso>
moogz: well, the logger will print out whereever you want it to. it can print to stdout, or to a file
<dminuoso>
moogz: and it will print whatever you pass to it.
code_ has joined #ruby
cdg has joined #ruby
Vingador has quit [Ping timeout: 265 seconds]
tildes has quit [Ping timeout: 276 seconds]
dunpeal has joined #ruby
Bish has quit [Ping timeout: 244 seconds]
schickung has joined #ruby
Bish has joined #ruby
arnonhongklay has quit [Read error: Connection reset by peer]
antgel has quit [Remote host closed the connection]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dunpeal>
With RSpec, is there an elegant way to set expectations over an entire collection?
<dunpeal>
For example, I can do `expect(foo.bar) to be_nil`, but can I easily apply the same for an Array of foo instances?
ta_ has joined #ruby
<Mon_Ouie>
You can just use something like array.all? { |e| e.bar.nil? }
jphase has joined #ruby
Alina-malina has quit [Ping timeout: 240 seconds]
Alina-malina has joined #ruby
crdpink has joined #ruby
arnonhongklay has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
tyang has joined #ruby
ta_ has quit [Ping timeout: 240 seconds]
crdpink2 has quit [Ping timeout: 250 seconds]
ferr has quit [Quit: WeeChat 1.5]
giz|work has quit [Ping timeout: 255 seconds]
blaxter has joined #ruby
Devalo has joined #ruby
<bhaak>
dunpeal: I would collect the values e.g. values = array.map(&:bar); expect(values.uniq).to eq [nil]
<dunpeal>
thanks.
blaxter has quit [Client Quit]
aegis3121 has joined #ruby
tvw has joined #ruby
lightheaded has quit [Remote host closed the connection]
AndrewIsHere has joined #ruby
nankyokusei has joined #ruby
raeoks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
panpainter has joined #ruby
Devalo has quit [Ping timeout: 276 seconds]
Moeh has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
panpainter has quit [Ping timeout: 244 seconds]
wugy has quit []
blaxter has joined #ruby
SteenJobs has joined #ruby
mustmodify__ has joined #ruby
pokalyis has joined #ruby
<Bish>
how exactly is "dup" defined?
bob434 has joined #ruby
<Bish>
copy all instance vars ? and that's it?
coolboy has joined #ruby
<mustmodify__>
I'm using Marshal.load(Marshal.dump( object )) to make a deep-copy of an object in Valuable, a gem I wrote. It's like attr-accessor with default values, a constructor, and other niceties. Anyway, Ruby is complaining that I can't Marshal StringIO which seems pretty obvious. But I'm just wondering if there is a "kinder, gentler" way to make a deep copy than Marshal.load(Marshal.dump(obj)) ... or is that most likely to be successful, given that I really don
griffindy has joined #ruby
SilverKey has joined #ruby
deadnull has joined #ruby
s2013 has joined #ruby
<Mon_Ouie>
Bish: dup also copies the #tainted? and #frozen? state of objects
baweaver has quit [Ping timeout: 276 seconds]
baweaver has joined #ruby
<Mon_Ouie>
And works by calling initialize_dup (instead of initialize) on a newly allocated object
tildes has joined #ruby
ltd has joined #ruby
sethetter has quit [Ping timeout: 240 seconds]
<lifted>
Hey family. I have a problem. I just took over the biggest freaking Rails/Ruby project. It consists of 3 primary apps, with 5 other ones used intermittently. The issue is a cronjob that occurs every morning and does a TON of stuff, maxing our primary server to 100% across 8 cores and consuming all 16GB of RAM. I need to load balance this app (reduce threading, increase machines), _AND_ make sure I can always SSH in (cant even SSH in
<lifted>
for 5 hours due to 100% CPU). I'm installing STATSD + GRAPHITE, then working on better managing of the threads under Sidekiq. Thoughts, suggestions?
brendan- has joined #ruby
mark_66 has quit [Quit: Leaving.]
mark_66 has joined #ruby
sethetter has joined #ruby
ta has quit [Remote host closed the connection]
lightheaded has joined #ruby
tildes has quit [Ping timeout: 258 seconds]
arnonhongklay has quit [Ping timeout: 260 seconds]
arnonhongklay has joined #ruby
ta has joined #ruby
haylon has joined #ruby
giz|work has joined #ruby
<mikecmpbll>
lifted : fix the script that kills the machine? ;)
bsrd has quit [Quit: WeeChat 1.5]
<lifted>
yeah - my plan is to use StatsD + graphite to find those issues
<lifted>
but any tips on identifying SPECIFIC methods/routines inside ruby i can optimize
<lifted>
or -
<mikecmpbll>
i dunno what either of those are, but sounds like a good shout.
<lifted>
any specific tools to load balance everything
<mikecmpbll>
load balance what, though?
<lifted>
i wish i could just get a new server, enter a command, and split the load 50/50
<lifted>
it's a huge amount of http requests.
<lifted>
30 threads
<lifted>
running 4-6 hours daily
<mikecmpbll>
why's that using so many resources
<lifted>
there's a bunch of processing done to the data we get back
<toretore>
lifted: there is no general answer to this, it's highly context specific
<mikecmpbll>
(many resources/much resource? idk)
<lifted>
lots of db io
<lifted>
thanks toretore - i assumed that but wasnt sure if there were some specific tools/resources you all use when confronted with this issue
<mikecmpbll>
optimise/increase spec of db server
<lifted>
its holding their business back and i need to be a hero
<toretore>
lifted: most useful is plain intuition from experience
<lifted>
ok, thanks, i'll keep digging :)
<lifted>
i appreciate the help!
<mikecmpbll>
we have similar data processed that run about 10 hours each day
<mikecmpbll>
processes*
<toretore>
lifted: how is it holding back though? sounds like it's running fine, and i assume you're not sharing that server with anything else
<mikecmpbll>
i've optimised it about 20 times in the last 4 years, whenever we grow we tend to find we get problems there :)
<lifted>
toretore: because the amount of time it takes to complete exceeds the amount of time we have to get that data from the biz perspective.
<lifted>
i would prefer to fix their code and optimize it
<lifted>
rather than just... buying and scaling physical
<toretore>
lifted: ok, so you mentioned sidekiq, which is a work queue, which also implies it could be split over several servers
<lifted>
is there any trick to saving like, 10% of one core, to make sure i can at least SSH in?
mtkd has quit [Ping timeout: 244 seconds]
<toretore>
for that you should look into cgroups and iptables and stuff like that for qos
<mikecmpbll>
reduce the number of threads
<lifted>
i'll have to do that later, because reducing the threads = increasing the time = i'm failing at providing the biz with the proper tech solution
<toretore>
num_threads = num_cores - 1 is pretty simple
<lifted>
true...
mtkd has joined #ruby
<mikecmpbll>
toretore : his task sounds like it has a lot of IO, so that's not necessarily the case
<mikecmpbll>
you can get improvement with threads on one core if there's lots of IO
hk238 has joined #ruby
<toretore>
well then it wouldn't peg the cores in the first place
JoshS has quit [Ping timeout: 240 seconds]
<lifted>
i think its just poor code to begin with
<toretore>
it's probably some huge jruby monster
<mikecmpbll>
well with 30 threads, no surprise they're maxing CPU
GinoManWorks has quit [Quit: Leaving]
zacts has joined #ruby
<toretore>
you'd have to do a lot of io to do that
jhack has joined #ruby
<mikecmpbll>
why?
<lifted>
We definitely have some JRuby stuff going on.
<mikecmpbll>
the more IO wait, the more threads to plug the gaps
<toretore>
= a lot
<lifted>
But the Jruby is running on 5 regular computers. The Ruby app that is controlling those Jruby clients is the one maxing. The JRuby 5 clients are fine, they're not doing anything crazy
<mustmodify__>
lifted: I mean, make a development db that has some subset of the production data and run through it?
dionysus69 has quit [Ping timeout: 240 seconds]
<mikecmpbll>
yeah, you're just going to have to go through the code and improve it.
lightheaded has quit [Remote host closed the connection]
<mikecmpbll>
or throw a load of hardware at it, or both
arnonhongklay has quit [Ping timeout: 244 seconds]
<mikecmpbll>
rubyprof is nice for finding slow stuff.
tildes has joined #ruby
ekinmur has joined #ruby
arnonhongklay has joined #ruby
saneax is now known as saneax-_-|AFK
<mikecmpbll>
we run our data import process through it and produce flame graphs every time we update the app, because it's easy to add something innocuous and slow down this process enormously.
mustmodify has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JeanCarloMachado has joined #ruby
the_drow has joined #ruby
AzureStigma has joined #ruby
ta has quit [Remote host closed the connection]
lifted has left #ruby [#ruby]
lifted has joined #ruby
kirun has joined #ruby
ccmcdee has quit [Quit: WeeChat 1.5]
the_drow has quit [Read error: Connection reset by peer]
<lifted>
can i use RubyProf on a rails app??
Burgestrand has joined #ruby
tildes has quit [Ping timeout: 244 seconds]
mustmodify__ has quit [Ping timeout: 250 seconds]
the_drow has joined #ruby
<mikecmpbll>
lifted : sure.
<lifted>
out of the box? or do i need to embed it
deadnull_ has joined #ruby
<mikecmpbll>
just add it to your gemfile (development group, most likely)
<mikecmpbll>
docs are on github.
craigp_ has quit [Ping timeout: 244 seconds]
dionysus69 has joined #ruby
deadnull has quit [Ping timeout: 255 seconds]
m_antis has joined #ruby
mustmodify___ has joined #ruby
giz|work has quit [Ping timeout: 250 seconds]
panpainter has joined #ruby
arnonhongklay has quit [Read error: Connection reset by peer]
arnonhon_ has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
mustmodify has quit [Ping timeout: 244 seconds]
RedNifre_ is now known as RedNifre
shinnya has joined #ruby
NetSage has quit [Remote host closed the connection]
pawnbox has joined #ruby
ruby_ has joined #ruby
pawnbox has quit [Remote host closed the connection]
dminuoso has quit [Ping timeout: 244 seconds]
pawnbox has joined #ruby
gizmore has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
Zggb has joined #ruby
JoshS has joined #ruby
ChiefAlexander has joined #ruby
KnownSyntax has quit [Ping timeout: 265 seconds]
the_drow has joined #ruby
tildes has joined #ruby
KnownSyntax has joined #ruby
eljimbo has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
the_drow has joined #ruby
sarbs has quit [Max SendQ exceeded]
SteenJobs has quit [Quit: SteenJobs]
sarbs has joined #ruby
shmuli has joined #ruby
m_antis has quit [Ping timeout: 250 seconds]
dionysus70 has joined #ruby
_whitelogger has joined #ruby
dionysus70 is now known as dionysus69
dionysus69 has quit [Ping timeout: 258 seconds]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arnonhon_ has quit [Read error: Connection reset by peer]
axisys has joined #ruby
m_antis has quit [Max SendQ exceeded]
tildes has quit [Ping timeout: 244 seconds]
arnonhongklay has joined #ruby
m_antis has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
ichabod_ has joined #ruby
kus has joined #ruby
kus has quit [Max SendQ exceeded]
ichabod_ is now known as Agent001
m_antis has quit [Max SendQ exceeded]
Xeago has joined #ruby
m_antis has joined #ruby
GodFather has joined #ruby
the_drow has joined #ruby
tildes has joined #ruby
nettoweb has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Yzguy has quit [Quit: Bye]
LoneHerm_ has joined #ruby
<dunpeal>
I have the following in my Gemfile: `Group :test do; gem 'foo'; end`. That means gem 'foo' will only be required for testing, right? So it won't even be installed in my (for example) production instance?
jaguarmagenta has joined #ruby
tildes has quit [Ping timeout: 240 seconds]
lightheaded has joined #ruby
rodfersou is now known as rodfersou|lunch
m_antis has quit [Ping timeout: 250 seconds]
hahuang65 has joined #ruby
BackEndCoder has quit [Excess Flood]
brixen has quit [Ping timeout: 276 seconds]
dminuoso has quit [Remote host closed the connection]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
g3funk has joined #ruby
nanoz has joined #ruby
nanoz has joined #ruby
nanoz has quit [Changing host]
Devalo has joined #ruby
tildes has quit [Ping timeout: 265 seconds]
LoneHerm_ has quit [Remote host closed the connection]
Beams has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
l4v2 has joined #ruby
<lifted>
Anything performance optimization ideas? Found my biggest performance sucker.... postgres... because of these lines: if params[:state] { render json: Method.where(state: params[:state]).group_by_month(:created_at).count } else { render json: Method.group_by_month(:created_at).count }
lightheaded has quit [Read error: Connection reset by peer]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest38 has joined #ruby
whathappens has quit [Ping timeout: 258 seconds]
waht has quit [Quit: ircN 8.00 for mIRC (20100904) - www.ircN.org]
gingray has quit [Ping timeout: 250 seconds]
SteenJobs has quit [Ping timeout: 258 seconds]
pwnd_nsfw` has joined #ruby
whathappens has joined #ruby
pokalyis has joined #ruby
devbug has quit [Quit: ZZZzzz…]
the_drow has quit [Read error: Connection reset by peer]
Snowy has quit [Remote host closed the connection]
ddffg has joined #ruby
Snowy has joined #ruby
pwnd_nsfw has quit [Ping timeout: 250 seconds]
craigp has joined #ruby
the_drow has joined #ruby
spudowiar has joined #ruby
bob434 has quit [Quit: This computer has gone to sleep]
AnarchyAo has joined #ruby
whathappens has quit [Ping timeout: 244 seconds]
whathappens has joined #ruby
Snowy has quit [Ping timeout: 276 seconds]
Lucky_ABA has joined #ruby
jenrzzz has joined #ruby
blackwind_123 has quit [Ping timeout: 244 seconds]
mtkd has quit [Ping timeout: 240 seconds]
the_drow has quit [Read error: Connection reset by peer]
SteenJobs has joined #ruby
mtkd has joined #ruby
the_drow has joined #ruby
blackwind_123 has joined #ruby
Silthias1 has joined #ruby
spudowiar has quit [Quit: Leaving.]
Silthias has quit [Ping timeout: 244 seconds]
Pumukel has quit [Remote host closed the connection]
bob434 has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
last_staff has joined #ruby
the_drow has joined #ruby
duderonomy has joined #ruby
k3rn31 has quit [Quit: Computer has gone to sleep.]
raMp has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
Pumukel has joined #ruby
bayed has quit [Quit: Connection closed for inactivity]
bocaneri has quit [Remote host closed the connection]
whathapp_ has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
the_drow has quit [Read error: Connection reset by peer]
the_drow has joined #ruby
Devalo has quit [Remote host closed the connection]
Es0teric has joined #ruby
jaruga_____ has quit [Quit: jaruga_____]
Es0teric has quit [Max SendQ exceeded]
spudowiar has joined #ruby
Es0teric has joined #ruby
<lifted>
Hey everyone. I'm using ActiveRecord to join "X" and "Y" together, and then for each result calling a separate routine. How do I sort the .join() based on a Column in X?
<lifted>
.order(X: [:created_at]) ?
<dminuoso>
?rails lifted
<ruby[bot]>
lifted: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
nanoz has quit [Read error: Connection reset by peer]
<aegis3121>
#RubyonRails might be a better choice for asking this
ramfjord has joined #ruby
mikecmpbll has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
the_drow_ has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
Snickers has joined #ruby
govg has quit [Ping timeout: 264 seconds]
l4v2 has quit [Quit: l4v2]
the_drow_ has quit [Read error: Connection reset by peer]
<kegster>
With this example code: "$current_selected_items.to_a.sort_by{|item| item.getGuid()}.reverse()" --- the ".sort_by{|item| item.getGuid()}" part -- is this shorthand?
whathapp_ has quit [Read error: Connection reset by peer]
the_drow_ has joined #ruby
hahuang65 has joined #ruby
the_drow_ has quit [Read error: Connection reset by peer]
<havenwood>
kegster: (Use snake_case for local variables since headlessCamels are an abomination in Ruby.)
<kegster>
what if i wanted to use some logic and branch it out more than a one liner?
whathappens has joined #ruby
<havenwood>
kegster: the last line of the block will implicitly return if you don't explicitly return from the block before it
the_drow has joined #ruby
<kegster>
so it has to be a one liner?
<kegster>
sorry if i'm annoying lol
the_drow has quit [Read error: Connection reset by peer]
<havenwood>
kegster: it doesn't have to be a one-liner
hahuang65 has quit [Quit: WeeChat 1.5]
cdg has quit [Remote host closed the connection]
nettoweb has joined #ruby
the_drow has joined #ruby
nettoweb has quit [Max SendQ exceeded]
<havenwood>
kegster: Try a multi-line block in irb or pry. You can do multi-line with either `do` and `end` or `{` and `}` blocks. Some folk prefer `do` and `end` for multiple lines.
ta has joined #ruby
Silthias1 has quit [Ping timeout: 244 seconds]
craigp has quit [Ping timeout: 244 seconds]
<kegster>
hmm i'll have to look into those
elaptics has joined #ruby
jphase has quit [Remote host closed the connection]
ferr has quit [Quit: WeeChat 1.5]
<havenwood>
kegster: irb is a REPL (Read Eval Print Loop) that ships with Ruby
<havenwood>
type `irb` from your command line
<havenwood>
?irb
<ruby[bot]>
irb is "interactive ruby", it is part of ruby. You can run ruby code and see results immediately. it's useful for testing code. Also see ?pry, a gem which is a popular alternative to irb.
ta has quit [Ping timeout: 265 seconds]
Immune has joined #ruby
smathews has quit [Quit: Leaving.]
_whitelogger has joined #ruby
Devalo has joined #ruby
jphase has joined #ruby
Silthias has joined #ruby
rbr has quit [Ping timeout: 255 seconds]
shmuli has joined #ruby
zacts has joined #ruby
zipace has joined #ruby
rbr has joined #ruby
jaguarmagenta has joined #ruby
Dimik has joined #ruby
l4v2 has joined #ruby
l4v2 has quit [Client Quit]
the_drow has quit [Ping timeout: 252 seconds]
the_drow has joined #ruby
ihre has quit [Read error: Connection reset by peer]
ihre- has joined #ruby
jaguarmagenta has quit [Ping timeout: 240 seconds]
ByVooDoo has joined #ruby
Pumukel has quit [Remote host closed the connection]
ByVooDoo has quit [Client Quit]
ahuman has quit [Ping timeout: 240 seconds]
sand-bird has quit [Ping timeout: 250 seconds]
s2013 has quit [Ping timeout: 258 seconds]
ihre- is now known as ihre
ledestin has joined #ruby
ahuman has joined #ruby
Devalo has quit []
coolboy has quit [Ping timeout: 264 seconds]
Lucky_ABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hahuang61 has quit [Quit: WeeChat 1.5]
rsampaio_ has joined #ruby
<kegster>
havenwood, don't have a command line with what i'm working with. at least easily accessible. long story.
<kegster>
however, if i have $foo and i want to get $items[$foo] -- how can i accomplish this?
the_drow has quit [Read error: Connection reset by peer]
Pumukel has joined #ruby
the_drow has joined #ruby
<havenwood>
kegster: It depends on what `$items` is.
<havenwood>
kegster: Ask it: $items.class
e4xit has quit [Ping timeout: 265 seconds]
<kegster>
ugh i wish i had a command line
<havenwood>
kegster: Try to never define your own global variables if you can help it. :-)
<havenwood>
kegster: Feedback from the REPL sure helps!
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<kegster>
well i'm writing small scripts to interact with an AI
<kegster>
API
davedev24 has quit []
<havenwood>
Even in small, one-off scripts you'll not need your own global variables.
<havenwood>
Just pretend they don't exist.
Avinty_L has joined #ruby
davedev24 has joined #ruby
plantfood has joined #ruby
rodfersou is now known as rodfersou|afk
davedev24 has quit [Remote host closed the connection]
Dobler has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
davedev24 has joined #ruby
Snickers has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Avinty_L has quit [Read error: Connection reset by peer]
s2013 has joined #ruby
the_drow has joined #ruby
spudowiar has quit [Quit: gtg]
davedev24 has quit [Remote host closed the connection]
the_drow has quit [Read error: Connection reset by peer]
Snickers has joined #ruby
the_drow has joined #ruby
the_drow has quit [Max SendQ exceeded]
jaguarmagenta has joined #ruby
chouhoulis has joined #ruby
the_drow has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
miqlas-H has joined #ruby
the_drow has quit [Ping timeout: 264 seconds]
e4xit has joined #ruby
dionysus69 has quit [Remote host closed the connection]
jhack has quit [Quit: jhack]
plantfood has quit [Quit: Leaving]
shmuli has quit [Remote host closed the connection]
dionysus69 has joined #ruby
GodFather has quit [Ping timeout: 265 seconds]
nankyokusei has joined #ruby
James123 has quit [Quit: Lost terminal]
Agent001 has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
artisangoose has joined #ruby
olistik has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 276 seconds]
sand-bird has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
bob434 has quit [Quit: This computer has gone to sleep]
nando293921 has quit [Ping timeout: 258 seconds]
nettoweb has joined #ruby
tectonic has joined #ruby
smathews has joined #ruby
eljimbo has quit [Quit: This computer has gone to sleep]
shmuli has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
jrafanie has joined #ruby
arup_r has joined #ruby
<arup_r>
I have in my excel a time column like 03:11:00 AM ,,, but when I am reading them using Roo gem, those values are being converted 26099 (numbers ).. How can I preserve the actual time?
nclbr_ has joined #ruby
devbug has joined #ruby
<arup_r>
every time column is being converted into an integer.. I am not getting how the converstion is happening..
SilverKey has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
shmuli has quit [Remote host closed the connection]
nclbr has quit [Ping timeout: 265 seconds]
anisha has quit [Quit: This computer has gone to sleep]
rodfersou|afk is now known as rodfersou
e4xit has quit [Ping timeout: 240 seconds]
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 265 seconds]
<jhass>
03:11:00 AM is literally 26099 ?
e4xit has joined #ruby
nclbr_ has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
dionysus69 has joined #ruby
elastix has joined #ruby
pharaoh2 has joined #ruby
tvw has quit [Remote host closed the connection]
panpainter has quit [Remote host closed the connection]
bob434 has joined #ruby
Vingador_ has quit [Ping timeout: 265 seconds]
davedev24 has joined #ruby
leftpad has quit [Ping timeout: 244 seconds]
<arup_r>
no 1 min.. I said that is the format I have in excel and all converted to some Fixnum always
<arup_r>
jhass: ^
davedev24 has quit [Remote host closed the connection]
Snickers has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Davedev28 has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
miqlas-H has joined #ruby
Snickers has quit [Client Quit]
raMp has quit [Quit: Konversation terminated!]
blackgoat has joined #ruby
jhack has joined #ruby
SteenJobs has joined #ruby
chouhoulis has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
coolboy has joined #ruby
davedev24 has joined #ruby
minimalism has joined #ruby
HendrikPeter has joined #ruby
naftilos76 has joined #ruby
sand-bird has quit [Ping timeout: 250 seconds]
dminuoso has quit [Ping timeout: 252 seconds]
Lildirt|SomeoneT has quit [Quit: Leb wohl, meine Freunde. Ich wünsche Ihnen das beste von Tagen.]
nando293921 has joined #ruby
zipace has quit [Quit: Leaving]
Pumukel has quit [Remote host closed the connection]
elaptics has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Lildirt has joined #ruby
shmuli has joined #ruby
hlieberman has joined #ruby
<hlieberman>
Any suggestions of a class that does something interesting when you call .new(arg) on it?
<hlieberman>
Or is there a command-builder, where you can turn strings into commands?
<hlieberman>
(My apologies in advance; ruby is not a language I know very well, so I'm plodding through trying to generate a test case for an exploit I think I found.)
Snowy has joined #ruby
gnufied has quit [Quit: Leaving]
postmodern has quit [Ping timeout: 250 seconds]
MrBusiness2 has quit [Quit: quittin' this]
MrBusiness has joined #ruby
swills has joined #ruby
<HendrikPeter>
I'm guessing you would like to change a string into a ruby function call?
ichabod_ has joined #ruby
ta has joined #ruby
Lildirt has quit [Ping timeout: 265 seconds]
<hlieberman>
That would be the best case, but I can't call .eval directly.
<hlieberman>
I need to somehow do it through an object construction.
<HendrikPeter>
yeah `eval('sring content')` was the thing I was thinking
<hlieberman>
Yeah. Basically, someone is using some metaprogramming that's not safely parsing user input.
<hlieberman>
So I'm in a situation where I can sort of do arbitrary things, but only sort of.
<toretore>
hlieberman: it's much easier to give advice on real use cases with actual code
ta has quit [Ping timeout: 244 seconds]
jphase has quit [Remote host closed the connection]
jaguarmagenta has joined #ruby
jphase has joined #ruby
<hlieberman>
toretore: I know... but this isn't my codebase, and it's live. I'm relatively sure this is an RCE, so I can't disclose anything that could give away what site this is before I've notified them and given them time to patch it.
spectrum has quit [Ping timeout: 240 seconds]
jkhl has quit [Ping timeout: 252 seconds]
<HendrikPeter>
I'd say any use of eval() is questionable practice & system() commands should only happen with variables that can not be manually changed from user input (by using cases for different inputs for example as a middle man)
<hlieberman>
HendrikPeter: They're not using eval(); they're unsafely using .constantize
jphase has quit [Ping timeout: 240 seconds]
<hlieberman>
foo = <user input>.constantize.new(<more user input>)
ichabod_ has quit [Remote host closed the connection]
jphase has joined #ruby
postmodern has joined #ruby
vuoto has joined #ruby
omphe has joined #ruby
panpainter has joined #ruby
whathapp_ has joined #ruby
cdg has quit [Remote host closed the connection]
whathappens has quit [Read error: Connection reset by peer]
cdg has joined #ruby
AnarchyAo has quit [Read error: Connection reset by peer]
HendrikPeter has quit [Quit: WeeChat 1.5]
pawnbox has quit [Remote host closed the connection]
k3rn31 has joined #ruby
yfeldblum has joined #ruby
BackEndCoder has quit [Excess Flood]
sneakers has joined #ruby
gingray has joined #ruby
flying has joined #ruby
haylon has quit [Quit: Leaving]
BackEndCoder has joined #ruby
k3rn31 has quit [Ping timeout: 260 seconds]
blackwell has quit [Ping timeout: 240 seconds]
jaguarmagenta has quit [Remote host closed the connection]
c0mrad3 has quit [Quit: Connection closed for inactivity]
testantho has joined #ruby
<havenwood>
hlieberman: RubyVM::InstructionSequence.new if someone could manage to call #eval
<hlieberman>
I should look at what they call downstream.
blackwell has joined #ruby
jackjackdripper has joined #ruby
GodFather has joined #ruby
omphe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<hlieberman>
The other thing I was looking at was that I can instantiate other controllers that might stomp on some of the variables the page is using.
davedev24 has quit []
anthony` has joined #ruby
pawnbox has joined #ruby
nogic has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
jenrzzz_ has joined #ruby
ramfjord has quit [Ping timeout: 255 seconds]
mtkd has quit [Ping timeout: 260 seconds]
whathapp_ has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
testantho has quit [Quit: Page closed]
jenrzzz has quit [Ping timeout: 244 seconds]
redpants has joined #ruby
mtkd has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
pawnbox has quit [Ping timeout: 244 seconds]
whathappens has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
omphe has joined #ruby
lightheaded has quit [Remote host closed the connection]
whathappens has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
omphe has quit [Client Quit]
whathappens has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
whathappens has joined #ruby
code has joined #ruby
JeanCarloMachado has quit [Ping timeout: 255 seconds]
whathappens has quit [Read error: Connection reset by peer]
Helheim has quit [Ping timeout: 250 seconds]
<code>
hey, is there a way to extract the index -- or equivalent to index -- from a key in a Hash?
whathappens has joined #ruby
omphe has joined #ruby
<Mon_Ouie>
Enumerable#find_index ?
whathappens has quit [Read error: Connection reset by peer]
Helheim has joined #ruby
rodfersou has quit [Quit: leaving]
<code>
Mon_Ouie: i'll look into that. thanks!
ldnunes has quit [Quit: Leaving]
whathappens has joined #ruby
pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
whathappens has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
pharaoh2 has joined #ruby
smathews has quit [Quit: Leaving.]
ramortegui has quit [Quit: Ex-Chat]
olistik has quit []
dminuoso has joined #ruby
ReK2 has quit [Quit: Konversation terminated!]
ReK2 has joined #ruby
ReK2 has quit [Changing host]
ReK2 has joined #ruby
sand-bird has joined #ruby
redpants has quit [Ping timeout: 240 seconds]
<zenspider>
code: "equivalent to index"? that IS the key, no?
DaniG2k has joined #ruby
naftilos76 has quit [Quit: Αποχώρησε]
davedev24 has joined #ruby
ReK2GnULinuX has joined #ruby
ReK2 has quit [Read error: Connection reset by peer]
sand-bird has quit [Ping timeout: 244 seconds]
davedev24 has quit [Client Quit]
dminuoso has quit [Ping timeout: 265 seconds]
arup_r has quit [Read error: Connection reset by peer]
claudiuinberlin has quit []
<code>
zenspider: well, perhaps i phrased that poorly. i want the order in which it is listed within the hash
<code>
what i currently have is just a method that does hash.each_with_index do |(key, value), index|
<code>
and searches for matches
<mikecmpbll>
hash.keys.index(key)
<code>
let me give that a shot :)
<code>
yep
jaguarmagenta has joined #ruby
<code>
that is exactly what i needed
<code>
thank you :)
vF3hNGxc47h8 has joined #ruby
pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]