havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.1, 2.3.4 & 2.2.7: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
hutch34 has joined #ruby
AnoHito has quit [Quit: Leaving]
Jayson_Virissimo has quit []
im0nde has joined #ruby
cadillac__ has joined #ruby
brent__ has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 240 seconds]
hotpanca_ has joined #ruby
brent__ has joined #ruby
Hunter1 has quit [Remote host closed the connection]
Hunter1 has joined #ruby
omab has quit [Ping timeout: 268 seconds]
solocshaw has quit [Ping timeout: 258 seconds]
cdg_ has quit [Ping timeout: 260 seconds]
brent__ has quit [Ping timeout: 268 seconds]
hotpanca_ has quit [Remote host closed the connection]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
whiteline_ is now known as whiteline
charliesome has joined #ruby
shinnya has quit [Ping timeout: 240 seconds]
quobo has quit [Quit: Connection closed for inactivity]
hotpancakes has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
jane_booty_doe has joined #ruby
jhack has joined #ruby
jhack has joined #ruby
jhack has quit [Changing host]
duderonomy has joined #ruby
plujon has quit [Remote host closed the connection]
jane_booty_doe has quit [Client Quit]
marr has quit [Ping timeout: 240 seconds]
MrBusiness has joined #ruby
Demo318 has joined #ruby
nowhereman_ has quit [Ping timeout: 246 seconds]
Derperperd has quit [Ping timeout: 240 seconds]
<zenspider> 18>> 1 + 2
<ruby[bot]> zenspider: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<zenspider> fuuuck you
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 240 seconds]
<zenspider> man. eval.in is a POS
weathermaker has joined #ruby
Uranio has quit [Quit: a kitty do not day, due teraflops request]
cadillac__ has quit [Ping timeout: 240 seconds]
latemus has joined #ruby
im0nde has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
Derperperd has joined #ruby
dc4 has joined #ruby
charliesome has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
Demo318 has quit [Ping timeout: 246 seconds]
GinoMan2440 has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ascarter has joined #ruby
Cohedrin has joined #ruby
DeeJayh_ has quit [Read error: Connection reset by peer]
Hunter1 has quit [Remote host closed the connection]
Hunter1 has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has quit [Remote host closed the connection]
brent__ has joined #ruby
SeepingN has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
brent__ has quit [Ping timeout: 240 seconds]
uZiel has joined #ruby
t-recx has quit [Quit: t-recx]
AndBobsYourUncle has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nankyokusei has joined #ruby
zing has joined #ruby
zing has left #ruby [#ruby]
hotpanca_ has joined #ruby
hotpanca_ has quit [Remote host closed the connection]
PorcoRex has joined #ruby
hotpanca_ has joined #ruby
<PorcoRex> Good evening.
gusrub_ has joined #ruby
mitt3ns has joined #ruby
agent_white has quit [Disconnected by services]
mitt3ns is now known as agent_white
gusrub has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 246 seconds]
Demo318 has joined #ruby
lxsameer has quit [Quit: WeeChat 1.7]
ozcanesen has quit [Quit: Textual IRC Client: www.textualapp.com]
ddffg has quit [Ping timeout: 240 seconds]
haraoka has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
dtcristo has left #ruby ["Kicked by @appservice-irc:matrix.org"]
Cohedrin has joined #ruby
Demo318 has quit [Ping timeout: 240 seconds]
hotpanca_ has quit [Remote host closed the connection]
arescorpio has joined #ruby
ecuanaso has joined #ruby
mim1k has joined #ruby
electrostat has quit [Quit: uwotm8]
mim1k has quit [Ping timeout: 240 seconds]
hotpanca_ has joined #ruby
Danny has joined #ruby
Danny is now known as Guest38892
Mia has quit [Ping timeout: 240 seconds]
electrostat has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
hotpanca_ has quit [Ping timeout: 255 seconds]
Cohedrin has joined #ruby
username has joined #ruby
Guest38892 has quit [Remote host closed the connection]
marxarelli is now known as marxarelli|afk
roshanavand has quit [Quit: roshanavand]
jhack has quit [Quit: Leaving]
AnoHito has joined #ruby
gusrub_ has quit [Remote host closed the connection]
d^sh has quit [Ping timeout: 246 seconds]
hotpancakes has joined #ruby
d^sh has joined #ruby
Danny has joined #ruby
Danny is now known as Guest25813
PorcoRex has quit [Quit: Leaving]
cdg has joined #ruby
hotpancakes has quit [Read error: Connection reset by peer]
hotpanc__ has joined #ruby
enterprisey has quit [Remote host closed the connection]
Guest25813 has quit [Ping timeout: 240 seconds]
Cohedrin has quit [Read error: Connection reset by peer]
genpaku has quit [Remote host closed the connection]
hutch34 has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
genpaku has joined #ruby
Cohedrin has joined #ruby
latemus has quit [Quit: life is bullshit]
jameser has joined #ruby
gothicsouth has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bauruine has quit [Ping timeout: 240 seconds]
Danny has joined #ruby
Danny is now known as Guest55161
hotpanc__ has quit [Remote host closed the connection]
charliesome has joined #ruby
KeyJoo has quit [Ping timeout: 255 seconds]
mitt3ns has joined #ruby
Guest55161 has quit [Ping timeout: 255 seconds]
Demo318 has joined #ruby
bauruine has joined #ruby
Danny has joined #ruby
Danny is now known as Guest55370
agent_white has quit [Ping timeout: 246 seconds]
Guest55370 has quit [Remote host closed the connection]
hotpanca_ has joined #ruby
__Yiota has joined #ruby
hotpanca_ has quit [Remote host closed the connection]
jrafanie has joined #ruby
hotpanca_ has joined #ruby
hotpanca_ has quit [Remote host closed the connection]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
hutch34 has quit [Ping timeout: 246 seconds]
ecuanaso has joined #ruby
uZiel has quit [Remote host closed the connection]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bbdk has joined #ruby
muelleme_ has joined #ruby
hotpancakes has quit [Remote host closed the connection]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
<bbdk> hey guys :) i've comming from JS.. and i have a question i would like to know the real diference between ruby and python..
alveric1 has quit [Quit: WeeChat 1.8]
Demo318 has quit [Ping timeout: 260 seconds]
muelleme_ has quit [Ping timeout: 258 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<elomatreb> bbdk: One is Ruby, the other is Python? More concrete pls
weathermaker has quit [Quit: weathermaker]
jrafanie has joined #ruby
uZiel has joined #ruby
jane_booty_doe has joined #ruby
whiteline_ has joined #ruby
uZiel_ has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
hotpancakes has quit [Remote host closed the connection]
whiteline has quit [Ping timeout: 264 seconds]
<bbdk> Sorry, I meant that, I would like to know the pros / cons of ruby ​​since, I am a javascript developer and many people tell me, to go to python and other ruby. So, I came here to hear from you that you are experienced.
csaunders_ has quit [Quit: later tater]
<elomatreb> They're not that different in the grand scale of things. Learn both if you're unsure and use what you like better
<Nilium> What do you want to do?
<Nilium> And when you've got that in mind, probably ask communities of both about that
<Nilium> And just leave out the whole "compared to this other language" bit
marxarelli|afk has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
jane_booty_doe has quit [Quit: Leaving]
<bbdk> Web dev
username has quit [Ping timeout: 255 seconds]
lel has joined #ruby
nankyokusei has joined #ruby
hotpancakes has joined #ruby
igniting has quit [Ping timeout: 240 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
bbdk has quit [Quit: leaving]
bauruine has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 246 seconds]
bauruine has joined #ruby
__Yiota has joined #ruby
csaunders has joined #ruby
igniting has joined #ruby
whiteline_ is now known as whiteline
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mahlon has quit [Read error: Connection reset by peer]
mahlon has joined #ruby
Derperperd has quit [Changing host]
Derperperd has joined #ruby
djbkd has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
Esf has joined #ruby
mim1k has joined #ruby
<Esf> Hi
gix has quit [Ping timeout: 240 seconds]
Esf has quit [Client Quit]
Esf has joined #ruby
meadmoon has joined #ruby
Esf has quit [Client Quit]
claw has quit [Ping timeout: 258 seconds]
claw has joined #ruby
gix has joined #ruby
mim1k has quit [Ping timeout: 268 seconds]
xall has joined #ruby
meadmoon has quit [Quit: I am functioning within established parameters.]
Demo318 has joined #ruby
pragmatism has quit [Ping timeout: 246 seconds]
Demo318 has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
hutch34 has joined #ruby
username has joined #ruby
djbkd has quit []
birdyondrugs has joined #ruby
Ropeney_ has joined #ruby
username has quit [Ping timeout: 255 seconds]
hutch34 has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
xall has quit [Quit: xall]
meshsmith has quit [Remote host closed the connection]
igniting has quit [Ping timeout: 240 seconds]
ledestin has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
nocaberi is now known as Sauvin
mim1k has joined #ruby
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
armyriad has quit [Ping timeout: 260 seconds]
armyriad has joined #ruby
uZiel_ has quit [Remote host closed the connection]
mim1k has quit [Ping timeout: 240 seconds]
ben__ has joined #ruby
ben__ has quit [Remote host closed the connection]
d5sx43 has joined #ruby
xall has joined #ruby
astrobunny has joined #ruby
uZiel has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
rohitpaulk has joined #ruby
ur5us has quit [Remote host closed the connection]
hotpancakes has quit [Ping timeout: 246 seconds]
latemus has joined #ruby
username has joined #ruby
bauruine has quit [Ping timeout: 255 seconds]
hotpancakes has joined #ruby
bauruine has joined #ruby
ascarter has joined #ruby
arescorpio has quit [Quit: Leaving.]
d5sx43 has quit [Quit: Leaving...]
brent__ has joined #ruby
igniting has joined #ruby
aupadhye has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
nankyokusei has joined #ruby
brent__ has quit [Ping timeout: 240 seconds]
ecuanaso has joined #ruby
Cohedrin has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
bauruine has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has joined #ruby
bauruine has joined #ruby
KeyJoo has joined #ruby
mitt3ns is now known as agent_white
patarr has joined #ruby
nertzy has quit [Ping timeout: 240 seconds]
Terens has quit [Ping timeout: 260 seconds]
ecuanaso has joined #ruby
username has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
patarr has quit [Ping timeout: 260 seconds]
ben__ has joined #ruby
nertzy has joined #ruby
rohitpaulk has quit [Ping timeout: 255 seconds]
ben__ has quit [Remote host closed the connection]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 240 seconds]
uZiel has quit [Ping timeout: 248 seconds]
Burgestrand has joined #ruby
Demo318 has joined #ruby
rohitpaulk has joined #ruby
uZiel has joined #ruby
cdg has quit [Remote host closed the connection]
Demo318 has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
hotpancakes has quit [Remote host closed the connection]
roshanavand has joined #ruby
hotpancakes has joined #ruby
oleo has quit [Quit: irc client terminated!]
gothicsouth has joined #ruby
hotpancakes has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
ecuanaso has joined #ruby
mistnim has joined #ruby
<mistnim> >> __dir__
<ruby[bot]> mistnim: # => "/tmp/execpad-557ffed6a6a7" (https://eval.in/817442)
<mistnim> did anything change about what __dir__ mean lately?
Abhijit has joined #ruby
<Abhijit> hi
<mistnim> it seemed to point to the dir where the code is. Now from where you are launching it?
<Abhijit> how can I make my ruby script insist on version and fail completely otherwise?
Burgestrand has quit [Quit: Closing time!]
<Abhijit> ruby version that is
davidmichaelkarr has quit [Quit: Connection closed for inactivity]
<mistnim> Abhijit, raise an error by checking the version?
<Abhijit> manually?
<Abhijit> is there anything builtin?
<elomatreb> Yeah, although you probably shouldn't
<Abhijit> why i should not+?
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mistnim> can I ask you what __dir__ gives you? The dir of the file where the code is or the dir from where you are launching that file?
<elomatreb> Well, it depends on the feature. If your script won't work with certain older versions it's probably evident from the error one would get
polysics_ has quit [Remote host closed the connection]
<Abhijit> hmm
polysics has joined #ruby
<SeepingN> would the shell dictate which directory is passed as the Current Working Directory?
<elomatreb> And if you hardcode a version check chances are you'll forget it and it would error on newer versions despite being able to work
<SeepingN> (though one would hope they all follow the same conventions)
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ecuanaso has joined #ruby
<elomatreb> mistnim: http://ruby-doc.org/core-2.4.1/Kernel.html#method-i-__dir__ -- I don't see it referencing the CWD anywhere
conta has joined #ruby
<SeepingN> I can see wanting to limit the version of ruby, esp if you don't have time to test it on several major releases. I have found the move from 1.6.7 to 2.0 to be full of surprises, many of which I didn't hit until certain timeout events triggered in production
Ropeney_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<elomatreb> 1.6 is ancient though, and included some of the most major changes in Ruby history
<elomatreb> E.g. upgrading from 2.2 to 2.3 was hardly any work for the most part
polysics has quit [Ping timeout: 258 seconds]
hotpancakes has joined #ruby
<Nilium> I'd be kind of surprised to see anyone who still used 1.6
postmodern has quit [Quit: Leaving]
<mistnim> this is really bad, if you use binding.pry __dir__ becomes ".", that's the opposite of useful for debugging
<dminuoso> mistnim: It's perfectly fine if you know what __dir__ does.
mtkd has quit [Read error: Connection reset by peer]
<dminuoso> mistnim: Use __FILE__ if you can't use it in a dynamic context.
mtkd has joined #ruby
<mistnim> dminuoso, if I have a function that uses __dir__ than it will fail if launched from pry
<mistnim> then*
ferr1 has joined #ruby
cschneid_ has joined #ruby
ascarter has joined #ruby
muelleme_ has joined #ruby
hotpancakes has quit [Ping timeout: 260 seconds]
<mistnim> then I have to investigate the problem and it was just pry being tricky
cschnei__ has joined #ruby
<dminuoso> mistnim: Well the issue is that __dir__ is a method that asks Kernel at runtime.
<dminuoso> Though.. mmm.
<dminuoso> Wait..
dc4 has quit [Ping timeout: 240 seconds]
silverdust is now known as Guest74864
<elomatreb> __FILE__ is set by pry, so that probably breaks things
cschneid_ has quit [Ping timeout: 240 seconds]
Abhijit has quit [Quit: Bye.]
mtkd has quit [Read error: Connection reset by peer]
mtkd has joined #ruby
<mistnim> in any case, I'm going with DIR = __dir__ on top, and then use DIR instead of __dir__
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hightower2 has joined #ruby
rohitpaulk has quit [Ping timeout: 260 seconds]
ecuanaso has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
muelleme_ has quit [Ping timeout: 240 seconds]
<mistnim> lol, I really have a troubled relationship with pry. Calling a function play is a bad idea
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
anisha has joined #ruby
hotpanca_ has joined #ruby
raul782 has joined #ruby
rohitpaulk has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ecuanaso has joined #ruby
Demo318 has joined #ruby
mistnim has quit [Remote host closed the connection]
raul782 has quit []
Guest74864 is now known as silverdust
cschnei__ has quit [Ping timeout: 240 seconds]
<dminuoso> mmmm
<dminuoso> elomatreb: Yeah you are right.
hotpanca_ has quit [Remote host closed the connection]
latemus has quit [Ping timeout: 240 seconds]
muelleme_ has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has joined #ruby
rgr has joined #ruby
latemus has joined #ruby
ignarps has quit [Ping timeout: 255 seconds]
biberu has joined #ruby
TomyWork has joined #ruby
ecuanaso has joined #ruby
watersoul_ has joined #ruby
Demo318 has quit [Ping timeout: 260 seconds]
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
watersoul has quit [Ping timeout: 240 seconds]
nankyokusei has joined #ruby
haraoka has quit [Ping timeout: 255 seconds]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 268 seconds]
muelleme_ has quit [Ping timeout: 260 seconds]
jaruga_________ has joined #ruby
ecuanaso has joined #ruby
rohitpaulk has quit [Ping timeout: 255 seconds]
ltem has joined #ruby
ignarps has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x86 has joined #ruby
mark_66 has joined #ruby
bvcosta has joined #ruby
joonty has joined #ruby
<x86> hello
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
patarr has joined #ruby
sleetdrop has quit [Quit: Computer has gone to sleep.]
solocshaw has joined #ruby
sleetdrop has joined #ruby
patarr has quit [Ping timeout: 255 seconds]
<al2o3-cr> o/
sleetdrop has quit [Client Quit]
<x86> no one alive?
<havenwood> x86: hey
<x86> hello
ryzokuken has joined #ruby
<hightower2> Do you have a quality question for us, x86 sir.
<x86> well.. it's not quality question. but: When do you find fun in ruby?
blackwind_123 has quit [Ping timeout: 260 seconds]
<ropeney> about 10am most days
<hightower2> always :) it's a language with cleanest/simplest syntax
<x86> I think I am recently too unmotivated.
<x86> It may be not a programming question.
sleetdrop has joined #ruby
bvcosta has quit [Remote host closed the connection]
pandaant has joined #ruby
blackwind_123 has joined #ruby
x86 has quit [Quit: Page closed]
<darix> Dir.pwd
ryzokuken has quit [Remote host closed the connection]
Silthias1 has joined #ruby
ryzokuken has joined #ruby
ecuanaso has joined #ruby
bvcosta has joined #ruby
charliesome has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
Silthias has quit [Ping timeout: 260 seconds]
jameser has quit [Ping timeout: 240 seconds]
psychicist__ has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
jenrzzz has quit [Ping timeout: 246 seconds]
bvcosta has quit [Remote host closed the connection]
jameser has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bauruine has quit [Max SendQ exceeded]
ddffg has joined #ruby
hanmac has quit [Ping timeout: 246 seconds]
bauruine has joined #ruby
mim1k has joined #ruby
bvcosta has joined #ruby
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yeticry_ has quit [Ping timeout: 240 seconds]
ecuanaso has joined #ruby
ddffg has quit [Ping timeout: 255 seconds]
yeticry has joined #ruby
hanmac has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pandaant has quit [Remote host closed the connection]
nofxxx has joined #ruby
rohitpaulk has joined #ruby
pandaant has joined #ruby
nofxx has quit [Ping timeout: 240 seconds]
cfec0b8d has quit [Remote host closed the connection]
lxsameer has joined #ruby
ropeney has quit [Quit: Leaving]
cfec0b8d has joined #ruby
nankyokusei has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
elomatreb has left #ruby ["Leaving"]
elomatreb has joined #ruby
hotpancakes has joined #ruby
faces has quit [Ping timeout: 260 seconds]
facest has joined #ruby
nankyokusei has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 246 seconds]
hotpancakes has quit [Ping timeout: 268 seconds]
rohitpaulk has quit [Ping timeout: 240 seconds]
ecuanaso has joined #ruby
bvcosta has quit [Remote host closed the connection]
joonty has quit [Quit: This computer has gone to sleep]
rohitpaulk has joined #ruby
bvcosta has joined #ruby
Beams has joined #ruby
ben__ has joined #ruby
KeyJoo has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
ben__ has quit [Remote host closed the connection]
mim1k has quit [Read error: Connection reset by peer]
mim1k has joined #ruby
astrobunny has quit [Remote host closed the connection]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
solocshaw has quit [Ping timeout: 246 seconds]
Demo318 has joined #ruby
ecuanaso has joined #ruby
marr has joined #ruby
chat_ has quit [Read error: Connection reset by peer]
chat_ has joined #ruby
Demo318 has quit [Ping timeout: 260 seconds]
joonty has joined #ruby
blackwind_123 has quit [Ping timeout: 260 seconds]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bvcosta has quit [Remote host closed the connection]
sysvalve has joined #ruby
ecuanaso has joined #ruby
<jokke> hi
<jokke> does someone see an obvious reason why the runtime measurement here https://github.com/meso-unimpressed/log_syringe/blob/master/lib/log_syringe/dsl.rb wouldn't work when measuring methods that are called from multiple threads
nowhereman_ has joined #ruby
doublemalt_ has joined #ruby
mim1k has quit [Disconnected by services]
mim1k_ has joined #ruby
mim1k_ is now known as mim1k
uZiel has quit [Remote host closed the connection]
patarr has joined #ruby
Bounga has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zenspider> define "wouldn't work"
<jokke> well apparently the measurements are way off
<zenspider> I'm waiting...
<jokke> i have a program that's been running for months single threaded. I implemented a threadpool to it today and i can verify that the total runtime has gone down significantly. If i add up the runtimes of the calls to the method i'm measuring i get a far greater number. Even greater than before the multithreading.
<zenspider> yes
<zenspider> theading takes work. that's expected
marr has quit [Ping timeout: 260 seconds]
<zenspider> threading, even...
<jokke> yeah
patarr has quit [Ping timeout: 255 seconds]
<ineb> runtime is faster but measured execution time is slower?
rohitpaulk has quit [Ping timeout: 255 seconds]
<zenspider> the sum of the thread times > old time > threaded time
ecuanaso has joined #ruby
<jokke> ineb: well the thing is i use the same mechanics to measure the total runtime which is basically just a method that creates and joins the threadpool
im0nde has joined #ruby
<jokke> zenspider: yes
<dminuoso> jokke: That sounds likely still.
<jokke> here's some code so you get the picture: https://p.jreinert.com/ef48I/
<dminuoso> jokke: Threads introduce context switches, waiting for shared resources, etc. So the overall CPU time can actually go up.
<dminuoso> (Even if total runtime goes down)
<jokke> dminuoso: i'm not measuring cpu time
<jokke> i'm just using started = Time.now; do_stuff; puts Time.now - started
<jokke> basically
<jokke> in one case do_stuff is the method which spawns and joins the threads
<jokke> and in one case it's the actual work done per thread
bvcosta has joined #ruby
<jokke> i also wrote log syringe and right now i'm regretting it a bit
<jokke> too much magic
<ineb> you couldve went with the proxy pattern
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jokke> mhm
solocshaw has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ecuanaso has joined #ruby
xall has quit [Ping timeout: 246 seconds]
sekmo has joined #ruby
<jokke> i wanted to be able to separate logging and metrics completely from the application code so that you could remove the files and everything would continue working as before
<ineb> good point
<jokke> but it has its downsides as you can see :)
<ineb> how about a hook then which triggers everytime a method is called to do the measuring?
<ineb> this would separate the logic
<ineb> such hooks can be done with Kernel#set_trace_func
patarr has joined #ruby
<jokke> yeah but i've heard it's pretty bad performance wise
sekmo has quit [Client Quit]
<ineb> yeah but maybe its okay if youre app is in testing
<ineb> for production you could simply disable it
alamar has quit [Ping timeout: 246 seconds]
Guest66963 has joined #ruby
<Guest66963> hi. anyone knows here howto configure the ssh credentials when using serverspec?
patarr has quit [Ping timeout: 240 seconds]
pale3 has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zenspider> ?answers Guest66963
<ruby[bot]> Guest66963: How to ask the right questions to get you the right answer: https://www.mikeash.com/getting_answers.html
Kug3lis has joined #ruby
uZiel has joined #ruby
<pale3> how to extract last and last parent substring from path. E.g case "/papa-foo/child-foo/grandchild-foo/grandgrandchild-foo/foo", get only "/grandgrandchild-foor/foo"?
jenrzzz has joined #ruby
<Guest66963> zenspider, options[:password] ||="<goforurpasswd>"
xall has joined #ruby
umaaji has joined #ruby
alamar has joined #ruby
alamar is now known as Guest44135
solocshaw has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
<ljarvis> pale3: just split on / and join the last 2 entries
<ljarvis> >> "foo/bar/baz".split("/")[-2..-1].join("/")
<ruby[bot]> ljarvis: # => "bar/baz" (https://eval.in/817670)
ecuanaso has joined #ruby
<pale3> ljarvis: ok thanks, i am not a ruby dev in any way, so I tried here
<pale3> ljarvis: thx it works
umaaji has quit [Quit: Leaving...]
Fernando-Basso has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nertzy has quit [Read error: Connection reset by peer]
nertzy has joined #ruby
ecuanaso has joined #ruby
Guest44135 has quit [Ping timeout: 255 seconds]
alamar has joined #ruby
alamar is now known as Guest61752
joonty has quit [Quit: This computer has gone to sleep]
bvcosta has quit [Remote host closed the connection]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
minimalism has quit [Quit: minimalism]
ecuanaso has joined #ruby
joonty has joined #ruby
chouhoulis has joined #ruby
acalycine has joined #ruby
ryzokuken_ has joined #ruby
chouhoulis has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
Guest61752 has quit [Ping timeout: 246 seconds]
ryzokuken has quit [Ping timeout: 240 seconds]
<zenspider> ljarvis: last takes a length param. url.split("/").last(2).join "/"
nankyokusei has joined #ruby
<zenspider> pale3: ^^
xall has quit [Quit: xall]
hutch34 has quit [Ping timeout: 246 seconds]
nankyokusei has quit [Ping timeout: 246 seconds]
jrafanie has joined #ruby
yokel has quit [Quit: Lost terminal]
<pale3> zenspider: thats also quite good solution, IMO they are both understandable
yokel has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
psychicist__ has quit [Ping timeout: 246 seconds]
bvcosta has joined #ruby
xenops has joined #ruby
alamar_ has joined #ruby
ecuanaso has joined #ruby
marr has joined #ruby
<zenspider> I wish File had better path manipulators. I've wanted this a few times
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
<Papierkorb> zenspider: Pathname?
<zenspider> yeah... I was just looking at that. don't think so?
<TomyWork> i have a bunch of little sinatra apps. can i use them with xinetd?
<ineb> Pathname can't do it
bvcosta has quit [Remote host closed the connection]
bvcosta has joined #ruby
nertzy has quit [Read error: Connection reset by peer]
<zenspider> I never really got into Pathname. Tho I guess I've wanted realpath before
jenrzzz has quit [Ping timeout: 268 seconds]
<Papierkorb> I find it much nicer to use than File/Dir. And also easy to test.
Demo318 has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ineb> maybe Pathname.new("/usr/bin/ruby").each_filename.to_a[-2..-1]
nertzy has joined #ruby
<ineb> pale3: ^
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Demo318 has quit [Ping timeout: 268 seconds]
rohitpaulk has joined #ruby
<Papierkorb> zenspider: practical example, we have lots of code using Pathname. Then that stuff had to talk through SSH to access remote files. Now there's RemotePathname, which mirrors the Pathname API (Or it inherited from Pathname, dunno), and suddenly, all that code cone work with remote stuff. A migration path is allowing the user to pass in a String or Pathname, and then just use the Pathname converter function to turn whatever into a Pathname for
<Papierkorb> internal use.
ecuanaso has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Seenox> Hi everyone. How can I use this sed in ruby? --> sed -n 's/.*\\s\\([0-9.]\\+\\)/\\1/p'
sepp2k has joined #ruby
Abhijit has joined #ruby
<Abhijit> hi
<Abhijit> i can require 'json' from rails app and irb in my system. but it fails saying cannot load such file -- json if i require 'json' in simple test.rb script
ecuanaso has joined #ruby
<daed> Seenox: something like this?
<Seenox> daed: Text would be something like this: http://rubular.com/r/Mh7Xfdd6g6 (Need 2.4.1 from it)
ryzokuken__ has joined #ruby
Puffball has quit [Remote host closed the connection]
ryzokuken_ has quit [Ping timeout: 246 seconds]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nertzy has quit [Read error: Connection reset by peer]
ldnunes has joined #ruby
nertzy has joined #ruby
horst has quit [Quit: horst]
<syndikate> For testing my ruby modules, should I be using test/unit or minitest?
Abhijit has quit [Quit: Bye.]
ecuanaso has joined #ruby
<daed> no idea seenox, use rubular to test stuff out
<Seenox> daed: trying...
bvcosta has quit [Remote host closed the connection]
bvcosta has joined #ruby
<kspencer> when you use begin->rescue, is it a bug that my begin code still totally runs even with an exception, or is there a way for it to abort right when it tries to run, as I'm running a db operation and I'm checking for whether there is already a record in the database, but all the code is getting ran instead of just the insert->which should then cause the 'duplicate entry' exception, and run my rescue code (Using
<kspencer> Sequel which exception is Sequel::UniqueConstraintViolation)
Puffball has joined #ruby
simmaniac has joined #ruby
warrshrike has joined #ruby
<warrshrike> Hey!
sysvalve has quit [Ping timeout: 240 seconds]
skweek has quit [Ping timeout: 240 seconds]
<warrshrike> im running a bash command like this
<warrshrike> output = "cd #{GL}; java -Xmx2400m -cp cfl2.jar Graph #{Base}/#{name} #{rhsid}" out = `#{output}`
bvcosta has quit [Ping timeout: 260 seconds]
<warrshrike> so i want to have more control over this
<warrshrike> essentially, if the command takes longer than 10 minutes terminate by force
khaki has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
anisha has quit [Ping timeout: 246 seconds]
<Seenox> daed: http://rubular.com/r/pKfBQO2Id0 now I just need to escape the second match.
anisha has joined #ruby
__Yiota has joined #ruby
brian_penguin has joined #ruby
muelleme_ has joined #ruby
GinoMan2440 has quit [Ping timeout: 240 seconds]
<ineb> warrshrike: maybe use a Timer with timeout condition http://www.rubydoc.info/github/rubyworks/facets/Timer
psychicist__ has joined #ruby
aglorei has quit [Read error: Connection reset by peer]
uZiel has quit [Read error: Connection reset by peer]
aglorei has joined #ruby
bast has quit [Ping timeout: 260 seconds]
GinoMan has joined #ruby
jenrzzz has joined #ruby
synthroid has joined #ruby
Abhijit has joined #ruby
<Abhijit> why this bug https://github.com/flori/json/issues/318 gets fixed with changing my shebang line from /usr/bin/ruby to /usr/bin/env ruby as pointed by one commentor?
bast has joined #ruby
bast has quit [Changing host]
bast has joined #ruby
<warrshrike> ineb: okay but i mean
GinoMan2440 has joined #ruby
<warrshrike> how does backticks work?
<warrshrike> does it take over the ruby process?
<warrshrike> in that case how i monitor it?
<warrshrike> or does it spawn a child process
nertzy has quit [Read error: Connection reset by peer]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 240 seconds]
nertzy has joined #ruby
<ineb> warrshrike: backticks, they just block and return the output as string as soon as the command finished
Abhijit has quit [Quit: Bye.]
<warrshrike> ineb: so can i use a timout condition with that?
GinoMan has quit [Ping timeout: 246 seconds]
<warrshrike> maybe if i use a second ruby thread?
<ineb> warrshrike: if you want more controle over the process, like stdin stdout and so on, you can use Open3
<warrshrike> ineb: i basically just want the timeout condition
uZiel has joined #ruby
<ineb> then you can use a timer
<warrshrike> ineb: cool lemme try it
KeyJoo has joined #ruby
rgr has quit [Quit: rgr]
__Yiota has joined #ruby
bvcosta has joined #ruby
muelleme_ has quit [Ping timeout: 240 seconds]
pupsicle has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
<warrshrike> hey what do i need to 'require'
<warrshrike> to include Timer
<pupsicle> 'facets/timer'
marr has quit [Ping timeout: 255 seconds]
ben_____ has joined #ruby
marr has joined #ruby
<warrshrike> pupsicle: unresolved...did you mean Time>
<pupsicle> Do you have the facets gem installed?
gizmore has joined #ruby
<warrshrike> no sir i do not
acalycine has quit [Quit: bye]
<warrshrike> that worked
<warrshrike> but the larger thing isn't working
<warrshrike> so
oleo has joined #ruby
<warrshrike> timer doesnt time out
<warrshrike> when doing `bash` commands with backticks
<warrshrike> ideas?
<warrshrike> comments?
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<warrshrike> any other way to put execution limits on backticks?
<pupsicle> You want a shell command to timeout?
<warrshrike> pupsicle: yup...so im doing this...output = "cd #{GL}; java -Xmx2400m -cp cfl2.jar Graph #{Base}/#{name} #{rhsid}"; out = `#{output}`
<warrshrike> but sometimes it takes hours
<warrshrike> and i want to set timeout to 10 minutes
hutch34 has joined #ruby
nankyokusei has joined #ruby
warrshrike_ has joined #ruby
<pupsicle> warrshrike: Did you see the Timeout class?
hutch34 has quit [Ping timeout: 258 seconds]
warrshrike has quit [Ping timeout: 260 seconds]
<warrshrike_> sorry got DC'D
<warrshrike_> the very first one
<warrshrike_> did anyone help?
<warrshrike_> pupsicle: ?
<warrshrike_> pupsicle: i followed this example http://www.rubydoc.info/github/rubyworks/facets/Timer
simmaniac has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 255 seconds]
doublemalt_ has quit [Read error: Connection reset by peer]
<warrshrike_> pupsicle: you think this would work? Timeout::timeout(TIMEOUT_SECONDS) do slow_api.call end
<pupsicle> If you're using backticks for the shell command, it won't kill that process automatically, but yes.
simmaniac has joined #ruby
<warrshrike_> pupsicle: so ti will or wont work with backticks?
simmaniac is now known as sysvalve
<pupsicle> I don't know what you're trying to implement exactly so it's hard to say. Have a read through this https://stackoverflow.com/questions/8292031/ruby-timeouts-and-system-commands
savoir-faire has joined #ruby
mim1k has joined #ruby
im0nde has quit [Quit: im0nde]
ryzokuken_ has joined #ruby
<warrshrike_> pupsicle: it worked!
<warrshrike_> but it throws an exception of TIMEDOUT
<warrshrike_> how can i recover from that?
<pupsicle> rescue
renchan has joined #ruby
meshsmith has joined #ruby
ryzokuken__ has quit [Ping timeout: 240 seconds]
<Papierkorb> Looks like some people are working on adding a JIT to MRI: https://github.com/vnmakarov/ruby/tree/rtl_mjit_branch#readme
<meshsmith> Does anyone know if Sass can be ran on GIT?
shynoob has joined #ruby
hlmjr has quit [Remote host closed the connection]
<warrshrike_> pupsicle: example? in java you need to either throws in method signature or throw-catch but in ruby i cant tel when sth will throw exp
<warrshrike_> pupsicle: nvm found exp
Demo318 has joined #ruby
doublemalt_ has joined #ruby
<konsolebox> Papierkorb: wasn't MRI a JIT already?
<chrisseaton> konsolebox: no MRI's never had a JIT merged into it - there have been some experiments though
<pupsicle> meshsmith: Restate your question.
<konsolebox> well that's good news. because you know MRI can still be made faster.
<meshsmith> K. Does anyone know if SASS, the CSS preprocessor that runs on Ruby, can be ran on Github pages?
<shynoob> Hey there, I am newbie here.. I just want to know if is it important to spend time with Ruby .. understand its constructs.. and then move on to Rails or I'll be just fine and catch up if I am a beginner in web development?
<hightower2> shynoob, knowing Ruby will help you a lot
shynoob has quit [Remote host closed the connection]
ferr1 has quit [Quit: WeeChat 1.8]
bvcosta has quit [Remote host closed the connection]
haylon has joined #ruby
bvcosta has joined #ruby
GinoMan2440 has quit [Remote host closed the connection]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
skweek has joined #ruby
shynoob has joined #ruby
GinoMan2440 has joined #ruby
<pupsicle> meshsmith: If you are using Github Pages' built in Jekyll support, it will. https://github.com/blog/1867-github-pages-now-runs-jekyll-2-2-0
<shynoob> Sorry I got disconnected
<pupsicle> meshsmith: but in general, no.
<cjohnson> shynoob: ruby has a lot of metaprogramming, if you are new to web dev spend a good deal of time just learning the language
<cjohnson> rails is written in ruby so you won't be able ot magically avoid learning the language and only learn the framework
<meshsmith> pupsicle, do I need to install Jeykll on top of Github Pages before I can run Sass, correct?
<meshsmith> : /
<meshsmith> This is unfortunate because my shared host only runs up to 1.8
<shynoob> I meant whether I might pick up the language while spending time with Rails or I'll have to actually play with Ruby distinctively? cjohnson,
<pupsicle> meshsmith: A remote git repo is not the same thing as Github.
<pupsicle> git is not github and github is not git.
<cjohnson> shynoob: I would always recommend starting with the basics for any language you aren't familiar with
<cjohnson> rails isn't the only way to write ruby
DLSteve_ has joined #ruby
<cjohnson> I'd say the same thing for JS and imo JS is much more straight forward of a language to understand
<meshsmith> They sure do a crap job making a distinction because all it takes a single setting change to turn something into a webpage.
<shynoob> And the problem for me is I just wont know how much time I shall give to a specific thing.. and when to move on.. cjohnson,
<shynoob> You know where exactly I should start with? cjohnson,
<cjohnson> shynoob: I had great success learning ruby from these exercises: http://exercism.io/languages/ruby/about
<cjohnson> as well as the ruby exercises here: http://paircolumbus.org/challenges/
<cjohnson> shynoob: then after you get the basics down a good book I'm told is "metaprogramming ruby 2"
Demo318 has quit [Ping timeout: 240 seconds]
<cjohnson> Haven't read it but all my colleagues recommend it
<shynoob> Oh thanks .. Ill check them out ! ASAP
ropeney has joined #ruby
shynoob has quit [Remote host closed the connection]
ryzokuken_ has quit [Remote host closed the connection]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ryzokuken_ has joined #ruby
synthroid has quit [Remote host closed the connection]
jenrzzz has joined #ruby
brian_penguin has quit [Remote host closed the connection]
synthroid has joined #ruby
rippa has joined #ruby
warrshrike_ has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
__Yiota has joined #ruby
xenops has quit [Quit: Textual IRC Client: www.textualapp.com]
renchan has quit [Quit: Leaving...]
Silox| has joined #ruby
aupadhye has quit [Ping timeout: 246 seconds]
roshanavand has quit [Quit: roshanavand]
sleetdrop has quit [Quit: Computer has gone to sleep.]
drptbl has joined #ruby
Hunter1 has quit [Remote host closed the connection]
Hunter1 has joined #ruby
sleetdrop has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jrafanie has joined #ruby
sleetdrop has quit [Client Quit]
charliesome has joined #ruby
arup___ has joined #ruby
cadillac_ has joined #ruby
<cjohnson> What do people recommend for interactive debugging in vim? I know you can use binding.pry but I was hoping to use vim to set breakpoints and step code and such
<cjohnson> I would need rspec integration for command line and passenger integration for web requests
<pupsicle> Just create a macro to insert binding.pry
<cjohnson> I don't see how that gives me vim integration?
<cjohnson> that just gives me a pry prompt on command line when I run rspec
<cjohnson> I'm specifically wanting to use vim's interactive debugger
brian_penguin has joined #ruby
Silthias1 has left #ruby [#ruby]
Silthias has joined #ruby
esfandyar has joined #ruby
esfandyar has quit [Client Quit]
igniting has quit [Ping timeout: 258 seconds]
patarr has joined #ruby
esfandyar has joined #ruby
oleo has quit [Read error: Connection reset by peer]
esfandyar is now known as esfandyar_
esfandyar_ has quit [Client Quit]
bmurt has joined #ruby
polysics has joined #ruby
__Yiota has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
mark_66 has left #ruby ["PART #elixir-lang :PART #crystal-lang :PONG :adams.freenode.net"]
<kspencer> when you use begin->rescue, is it a bug that my begin code still totally runs even with an exception, or is there a way for it to abort right when it tries to run, as I'm running a db operation and I'm checking for whether there is already a record in the database, but all the code is getting ran instead of just the insert->which should then cause the 'duplicate entry' exception, and run my rescue code (Using
<kspencer> Sequel which exception is Sequel::UniqueConstraintViolation)
shinnya has joined #ruby
skweek has quit [Ping timeout: 260 seconds]
mim1k has joined #ruby
<adam12> kspencer: show some code please.
oleo has joined #ruby
<kspencer> i'll have to pastebin it later, as i need to get back to work.
anisha has quit [Quit: This computer has gone to sleep]
patarr has quit [Ping timeout: 240 seconds]
Renich_ has joined #ruby
Renich_ has quit [Remote host closed the connection]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Renich has quit [Ping timeout: 260 seconds]
arup___ has quit [Remote host closed the connection]
__Yiota has joined #ruby
TomyWork has quit [Ping timeout: 240 seconds]
patarr has joined #ruby
theunraveler has joined #ruby
hogetaro has quit [Quit: Leaving...]
enterprisey has joined #ruby
xenops has joined #ruby
hotpanca_ has joined #ruby
conta has quit [Ping timeout: 246 seconds]
hutch34 has joined #ruby
nankyokusei has joined #ruby
pankaj has joined #ruby
bvcosta has quit [Remote host closed the connection]
cfec0b8d has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 246 seconds]
hutch34 has quit [Ping timeout: 255 seconds]
zerowaitstate has joined #ruby
pandaant has quit [Remote host closed the connection]
hutch34 has joined #ruby
TomyLobo has joined #ruby
heliumk has joined #ruby
<brian_penguin> when you rescue exceptions in ruby the code will continue to execute
dionysus69 has quit [Ping timeout: 240 seconds]
<brian_penguin> if you were to do something like "rescue MyErrorClass => err"
<brian_penguin> you could do something to save state or log the error and then call "raise err" to stop execution again
heliumk has left #ruby ["Leaving"]
elifoster has joined #ruby
arup_r has joined #ruby
cbyrda has quit [Quit: leaving]
hotpanca_ has quit [Remote host closed the connection]
_joes____ has joined #ruby
lacuna has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
cdg has joined #ruby
rohitpaulk has quit [Ping timeout: 240 seconds]
patarr_ has joined #ruby
patarr has quit [Ping timeout: 260 seconds]
<arup_r> Got a question. I was reading https://bearmetal.eu/theden/how-do-i-know-whether-my-rails-app-is-thread-safe-or-not/. In this section *What is and what isn’t thread-safe in Ruby?* the author said final value of this code https://gist.github.com/aruprakshit/406dbd84ca5adeb1b9d2a62aa588be1a is *undetermined*. What did he mean here? because every time i run it, I get final value as 300. I am missing something here. Can u he
<arup_r> lp?
biberu has quit []
anisha has joined #ruby
polishdub has joined #ruby
<cjohnson> Just because you get 300 doesn't mean it's guaranteed to always be 300
<arup_r> can you explaim why not guranteed?
<elomatreb> arup_r: Imagine: Thread 1 reads the current value, say, 50, but the then the scheduler switches to Thread 2, which also reads 50, adds 1 and writes it back, and it schedules back to Thread 1, which adds 1 to 50 and writes back 51
<elomatreb> So you skipped one add
<pupsicle> That increment operation is not atomic
<elomatreb> It consists of three parts: Reading the value, adding one, and writing it back. It may be interrupted between those
<ljarvis> arup_r: write @n += 1 like this: @n = @n + 1 -- does that make a difference?
<ljarvis> (in your understanding)
<ljarvis> there's 2 things happening here, Ruby just has some syntax sugar for doing it: "+="
alamar_ has quit [Ping timeout: 255 seconds]
<elomatreb> I bet if you run that example a couple of times you'll end up with different values sometimes
belmoussaoui has quit [Remote host closed the connection]
<cjohnson> could experiment doing it while the CPU is pegged, that might influence
<arup_r> ljarvis: I know `+=` .. I was just not getting why the final value of @n is not determined.. But elomatreb broke it down and now it is clicking to me.. :)
millerti has joined #ruby
<elomatreb> It's a little tricky/dangerous in Ruby since it doesn't actually execute code in more than one thread at a time, which may make unsafe operations seem safer than they are
belmoussaoui has joined #ruby
cschneid_ has joined #ruby
<arup_r> so that is why class variables are not good to use people says ?
bvcosta has joined #ruby
<ljarvis> no
<elomatreb> @@class_vars are rarely used because they are confusing and rarely what you actually want, they're not more or less threadsafe than @instance_vars or e.g. module state without locks
<cjohnson> are ruby threads green or does it use real threads?
brent__ has joined #ruby
<bougyman> depends on the ruby implementation
<cjohnson> standard ruby I guess
polysics has quit [Ping timeout: 240 seconds]
alamar has joined #ruby
cschnei__ has joined #ruby
<elomatreb> MRI uses native threads IIRC but due to locking you only get something from them when waiting for IO
alamar is now known as Guest80925
<havenwood> cjohnson: System threads in 1.9+. They were green threads in 1.8.
<bougyman> and jruby uses the jvm threading, rubinius is native threads, I believe.
<cjohnson> makes sense, thanks
<havenwood> elomatreb: It can release for things other than IO, but IO is probably the most important. C-ext gems don't have to GIL, etc. Here's a gist to be devilish and bypass it yourself: https://gist.github.com/tenderlove/5733632
cschneid_ has quit [Ping timeout: 260 seconds]
<elomatreb> A friend told me numpy in Python does something like that
belmoussaoui has quit [Remote host closed the connection]
AndBobsYourUncle has joined #ruby
AndBobsYourUncle has quit [Client Quit]
belmoussaoui has joined #ruby
hobodave has joined #ruby
hotpancakes has quit [Remote host closed the connection]
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
cdg_ has joined #ruby
psychicist__ has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
cdg has quit [Ping timeout: 268 seconds]
hotpancakes has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
bauruine has quit [Quit: ZNC - http://znc.in]
bauruine has joined #ruby
cschnei__ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
cschneid_ has quit [Read error: Connection reset by peer]
doublemalt_ has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #ruby
cschneid_ has joined #ruby
username has joined #ruby
belmoussaoui has quit [Ping timeout: 240 seconds]
belmoussaoui has joined #ruby
Silox| has quit [Quit: Connection closed for inactivity]
cschneid_ has quit [Ping timeout: 246 seconds]
ketan has joined #ruby
ResidentBiscuit has quit [Ping timeout: 260 seconds]
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
rohitpaulk has quit [Ping timeout: 246 seconds]
ecuanaso has joined #ruby
sekmo has joined #ruby
duderonomy has quit [Ping timeout: 240 seconds]
ledestin has joined #ruby
jrafanie has joined #ruby
sekmo has quit [Client Quit]
ledestin has quit [Ping timeout: 240 seconds]
pankaj has quit [Ping timeout: 255 seconds]
nitric has joined #ruby
kies has quit [Ping timeout: 260 seconds]
mim1k has quit [Quit: Lost terminal]
gusrub has joined #ruby
rohitpaulk has joined #ruby
<arup_r> yeah so I feel like I needed an @@x var, I go with constants as they feel more reliable.. because it throws error while someone by mistake try to mutate it
<arup_r> when I feel like*
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
[Butch] has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chalkmonster has joined #ruby
Bounga has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
brent__ has quit [Remote host closed the connection]
brent__ has joined #ruby
jrafanie has joined #ruby
theunraveler has quit []
ascarter has joined #ruby
hotpancakes has quit [Remote host closed the connection]
chalkmonster has quit [Quit: Daddy's flown, 'cross the ocean.]
brent__ has quit [Ping timeout: 255 seconds]
joonty has quit [Quit: This computer has gone to sleep]
ascarter has quit [Client Quit]
rohitpaulk has quit [Ping timeout: 240 seconds]
simmaniac has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
ascarter has joined #ruby
ascarter has quit [Client Quit]
sysvalve has quit [Ping timeout: 240 seconds]
pb122 has joined #ruby
muelleme_ has joined #ruby
lxsameer has quit [Quit: WeeChat 1.7]
KeyJoo has quit [Read error: Connection reset by peer]
uZiel has quit [Ping timeout: 248 seconds]
uZiel has joined #ruby
MarkBilk has quit [Ping timeout: 258 seconds]
hotpancakes has joined #ruby
ascarter has joined #ruby
MarkBilk has joined #ruby
Beams has quit [Quit: .]
uZiel has quit [Remote host closed the connection]
uZiel_ has joined #ruby
uZiel_ has quit [Client Quit]
hotpancakes has quit [Remote host closed the connection]
uZiel has joined #ruby
MarkBilk_ has joined #ruby
muelleme_ has quit [Ping timeout: 240 seconds]
hotpancakes has joined #ruby
synthroid has quit []
SegFaultAX has joined #ruby
MarkBilk has quit [Ping timeout: 258 seconds]
pupsicle has quit [Quit: Leaving]
eightlimbed has joined #ruby
nankyokusei has joined #ruby
hotpancakes has quit [Ping timeout: 240 seconds]
AndBobsYourUncle has joined #ruby
arup_r has quit [Remote host closed the connection]
rohitpaulk has joined #ruby
gusrub has quit [Read error: Connection reset by peer]
nankyokusei has quit [Ping timeout: 258 seconds]
kies has joined #ruby
aredride- has quit [Ping timeout: 246 seconds]
gusrub has joined #ruby
AndBobsYourUncle has quit [Ping timeout: 240 seconds]
gusrub has quit [Remote host closed the connection]
<eightlimbed> im learning about the step method... ruby-doc says it iterates over a range passing each nth element to a block
LBRapid has quit [Ping timeout: 255 seconds]
znz_jp has quit [Ping timeout: 246 seconds]
hotpancakes has joined #ruby
aredridel has joined #ruby
<eightlimbed> but in this script (https://gist.github.com/loganhasson/8937903) the author called step on an integer
LBRapid has joined #ruby
hotpanca_ has joined #ruby
thekingofbandit has quit [Ping timeout: 240 seconds]
<eightlimbed> and used two arguments
JoshS has quit [Ping timeout: 268 seconds]
pupsicle has joined #ruby
<eightlimbed> ex: 81.step(1000,9)
unsymbol has quit [Ping timeout: 255 seconds]
pupsicle has quit [Client Quit]
<eightlimbed> i'm confused
thekingofbandit has joined #ruby
unsymbol has joined #ruby
ntt_ has quit [Ping timeout: 255 seconds]
znz_jp has joined #ruby
<baweaver> &ri Integer#step
bvcosta has quit [Remote host closed the connection]
bvcosta has joined #ruby
hotpancakes has quit [Ping timeout: 246 seconds]
psychicist__ has joined #ruby
hotpancakes has joined #ruby
<eightlimbed> ahh
<eightlimbed> thanks baweaver and derpy
brian_penguin has quit [Remote host closed the connection]
<baweaver> derpy is a bot
bvcosta has quit [Ping timeout: 260 seconds]
<eightlimbed> lol
hotpanca_ has quit [Ping timeout: 246 seconds]
GinoMan1423 has joined #ruby
blackwind_123 has joined #ruby
<eightlimbed> baweaver do i need to install something beyond the basic ruby installer (i'm running windows) to be able to type &ri Integer#step in the command line?
<baweaver> just take the & off
Cohedrin has joined #ruby
GinoMan1423 has quit [Remote host closed the connection]
GinoMan1423 has joined #ruby
hotpancakes has quit [Ping timeout: 246 seconds]
guacamole has quit [Quit: leaving]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GinoMan2440 has quit [Ping timeout: 240 seconds]
hotpancakes has joined #ruby
ecuanaso has joined #ruby
MrBusiness has quit [Read error: Connection reset by peer]
hotpancakes has quit [Remote host closed the connection]
ornerymoose has joined #ruby
hotpancakes has joined #ruby
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
<ornerymoose> Hello. Minor issue with my validate() method here and I’m a bit stuck. https://gist.github.com/anonymous/1d37812b221f5b2c22a1f8b9bf00d16e It’s returning all 0’s for that column, and the majority should be 1’s. Any insight as to what I’m doing wrong?
enterprisey has quit [Remote host closed the connection]
blackwind_123 has quit [Ping timeout: 255 seconds]
ruby-lang580 has joined #ruby
<hanmac> ornerymoose: do you have some test data?
blackwind_123 has joined #ruby
<elomatreb> Yeah, maybe reduce that example a little more. There's a lot going on there
<hanmac> hm or is maybe the case sensitive wrong?
Bounga has joined #ruby
<ornerymoose> hanmac: actually i accidentially lied. in the SQL query itself on SSMS HBO should return 7856 rows. when i open up the csv there is 7356 items in the HBO column with 1’s (so at least its populating them, but missing roughly 500 1’s)
<ornerymoose> hanmac: thats what i was thinking or maybe some whitespace
<ornerymoose> but doesnt appear to be so in SSMS
ResidentBiscuit has joined #ruby
bigkevmcd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Bounga has quit [Remote host closed the connection]
Bounga has joined #ruby
ketan has quit [Remote host closed the connection]
ketan has joined #ruby
dionysus69 has joined #ruby
statelesscode has quit [Quit: statelesscode]
<ornerymoose> elomatreb: you’re right, hopefully this is a bit easier on the eyes: https://gist.github.com/ornerymoose/36fbf193b43c81d3a53c982f45ddfa71
<ornerymoose> Note ‘offering’ is one of the columns returned in the SQL query
ketan has quit [Ping timeout: 246 seconds]
zerowaitstate has quit [Quit: Lost terminal]
statelesscode has joined #ruby
hotpancakes has quit [Remote host closed the connection]
bvcosta has joined #ruby
bvcosta has quit [Remote host closed the connection]
<eightlimbed> baweaver: i got the docs installed, this will be very helpful. thank you!
<elomatreb> ornerymoose: You could maybe try printing the values your validate method is getting passed (`p something` is debug print)
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Bounga has quit [Ping timeout: 246 seconds]
ecuanaso has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Bounga has joined #ruby
benlieb has joined #ruby
Hunter1 has quit [Remote host closed the connection]
<ornerymoose> elomatreb: got it, definitely something to do with the data. I’ve updated the gist: https://gist.github.com/ornerymoose/36fbf193b43c81d3a53c982f45ddfa71 and it’s not returning the correct number of rows. Now, question is, is that tacky use of gsub? Should I be fixing the HBO entries in the database instead? (whether it be LTRIM RTRIM etc)
<ornerymoose> and it’s now***
Hunter1 has joined #ruby
<elomatreb> If you can I don't see why you should work around broken data when you can fix it
pragmatism has joined #ruby
<ornerymoose> yeah, fair point
<ornerymoose> appreciate the help
gusrub has joined #ruby
<havenwood> Always nice to coax the data towards sanity rather than follow it with your code into insanity.
ruby-lang580 has left #ruby [#ruby]
<havenwood> If it's your data to munge.
Bounga has quit [Ping timeout: 246 seconds]
simmaniac has quit [Quit: Leaving]
aredridel has quit [Ping timeout: 276 seconds]
duderonomy has joined #ruby
meshsmith has quit [Remote host closed the connection]
enterprisey has joined #ruby
jaruga_________ has quit [Quit: jaruga_________]
brent__ has joined #ruby
<ornerymoose> havenwood: very good point
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
aredridel has joined #ruby
SCHAPiE has quit [Read error: Connection reset by peer]
gothicsouth has joined #ruby
ivanskie has joined #ruby
<ivanskie> hi
<ivanskie> hows everyone doing
cdg_ has quit [Ping timeout: 260 seconds]
latemus has quit [Ping timeout: 240 seconds]
ascarter has joined #ruby
benlieb has quit [Quit: benlieb]
benlieb has joined #ruby
<ivanskie> have this problem i can't wrap my head around
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ivanskie> thought i'd reach out
SCHAPiE has joined #ruby
ldnunes has quit [Ping timeout: 260 seconds]
<elomatreb> Feel free to post what you've got, if someone can help they'll respond
<kspencer> ivanskie: well we don't know your problem without you posting it
<ivanskie> but i thought you guys are so advanced that can read minds across the globe ?
<ivanskie> i'm dissapointed :(
__Yiota has joined #ruby
<elomatreb> Only during working hours, it's the weekend
<ivanskie> ah okay
patarr_ has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby
<ivanskie> just trying to figure out how to share a screenshot in least painful way
<kspencer> :| I was just about to say we're not mind readers, as its a general thing that's said in help channels when people ask to ask
<kspencer> imgur or lightshot
<kspencer> i'd say
<ivanskie> was just kidding. trying to help you help me as they say. get my shit together so the problem makes sense
Silthias has quit [Read error: Connection reset by peer]
<ivanskie> thats the screenie from app im working on. in essense i have to download 5 files from 22 devices, so i wrote this to do it for me. also combines the csv files into a single per device.
<ivanskie> the problem came in when realize i have to skip some rows
Silthias has joined #ruby
<ivanskie> while checking each row to see if it has a match from either values inside an array. its not working how i want it to. so i think im fucking up the loop there
hotpancakes has quit [Ping timeout: 246 seconds]
patarr has joined #ruby
ldnunes has joined #ruby
hotpancakes has joined #ruby
aglorei has quit [Ping timeout: 248 seconds]
<elomatreb> Is it skipping too many, too few, the wrong lines?
<ivanskie> the test code i made, that i mentioned in gist. seem to work partially. it says it skips 27 times, but actually prints out some wrong ones.
[Butch] has quit [Quit: I'm out . . .]
<ivanskie> code in the app on repo skips too few.
aglorei has joined #ruby
<ivanskie> as you see in screenshot, i need to keep it under 1000, and the code seems to only skip one row
<ivanskie> i think I have an idea of how to fix it, but i want to understand what im doing wrong here.
<elomatreb> Minor thing that pains me: You can do `var += 1` instead of `var = var + 1`
<kspencer> https://paste.ofcode.org/5cLibcJftaXXV9qT9cJfWG <-- here's my problem if anyones got any ideas on why all code in the begin (the insert is anticipated to raise Sequel::UniqueConstraintViolation when there is already the same ip in the database) and all the code in the rescue is ran, which means my log returns empty fields, and runs the Log#import Log#dupe and Log#db functions (which write templated log lines)
<ivanskie> skiplist, right now, includes both numbers and strings. so the numbers are just the individual addresses that should be skipped, but i realized that only the string gets repeated, the numbers in csv files vary. so i patched on the strings ('Max Vac'). so i think i can fix it by using smarter_csv since im already using it elsewhere in the app. and only match against strings, and only in single column, could probably speed the whole thing up a bit.
d10n-work has joined #ruby
Bounga has joined #ruby
<ivanskie> elomatreb: yah i've taken a bit of a break from ruby stuff, and have been burying my head with learning javascript. so this was just a quick fix when i realized you can't do var++ in ruby lol. i plogize for the pain, but its shared. thanks
xall has joined #ruby
<ivanskie> i was about to re-do the gist and just make a repo with extracted functionality with sample files it downloads and the test code thats it.
<ivanskie> don't have time to write a full test with faker on this
hutch34 has quit [Ping timeout: 246 seconds]
ecuanaso has joined #ruby
<elomatreb> You want to skip a row of that CSV if it contains one of the entries of the skiplist in any of the fields, did I get that right?
Bounga has quit [Ping timeout: 255 seconds]
<ivanskie> yes
<elomatreb> You said your gist does something incorrect, could share some output?
mtkd has quit [Ping timeout: 260 seconds]
ryzokuken_ has quit [Quit: Leaving]
mtkd has joined #ruby
<elomatreb> I'm at a laptop right now, could you update the gist maybe?
cadillac__ has joined #ruby
<adam12> kspencer: it looks OK. Stick a log entry into the rescue clause and make sure it's firing.
<ivanskie> ya
cadillac_ has quit [Ping timeout: 240 seconds]
<kspencer> adam12: there's 2 that are in the rescue clause, all 3 run even when I've deleted the rows
<kspencer> l2f.dupe and l2f.db are both loggers
Sauvin has quit [Ping timeout: 240 seconds]
<elomatreb> Maybe print whole row (with `p` instead of puts for debug print) in line 18, so we can actually see what's happening
cdg has joined #ruby
cschneid_ has joined #ruby
<ivanskie> one sec
<adam12> kspencer: Remind me of the issue again? The rescue clause is always run? or it's never run?
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has quit []
Demo318 has joined #ruby
hutch34 has joined #ruby
<kspencer> even if there is no duplicates (DELETE FROM table WHERE `column` LIKE '127.%'; before checking) and then import the ips, the whole begin and the whole rescue clause run, instead of tripping up on just the insert and raising the exception
<kspencer> @ adam12
cschneid_ has quit [Ping timeout: 240 seconds]
<kspencer> so when there are no duplicates, it runs the insert and Log.import() yet also runs the rescue clause for each address
bauruine has quit [Ping timeout: 255 seconds]
Demo318 has quit [Ping timeout: 246 seconds]
rohitpaulk has quit [Ping timeout: 260 seconds]
<ivanskie> srry had work call
bauruine has joined #ruby
<elomatreb> The first row in the output is skipped because it contains "2", which is also in your skiplist
lagweezle_away is now known as lagweezle
<elomatreb> Oh, `count += count` does not seem like what you want btw
<ivanskie> lol
<ivanskie> so count =+ count then?
<ivanskie> or what i had before
<elomatreb> No, currently you're adding count to count, effectively multiplying it by two ever time
<ivanskie> ah
<elomatreb> You want `+= 1`
<ivanskie> still says 27 lol
<ivanskie> ah thats because i didn't change it in my code just gist
<ivanskie> lol
* kspencer claps
<ivanskie> thanks
<ivanskie> thats arbitrary tho. still don't understand the rest.
<ivanskie> so i think i'll just make it more complex and use header
<ivanskie> and match against a single column instead of whole row
<elomatreb> From what I can see every row that is skipped is supposed to be skipped, since they all seem to contain a "2"
<elomatreb> That's probably a good idea, yes
* ivanskie eyeroll
<ivanskie> yep
<ivanskie> okay well im glad that im not going crazy then. it does exactly what i want it to do.
<ivanskie> just too well
<kspencer> heh
<ivanskie> on the other hand.
<ivanskie> yeah no. i better rewrite this part anyway
<ivanskie> thanks elomatreb!
<kspencer> adam12: any headway?
<adam12> kspencer: tbh it all looks fine, but there's a lot of noise, and it's tough to replicate without seeing schema + data you're importing.
<adam12> kspencer: Maybe capture the exception as well and see if it anything is in the `message` property.
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<kspencer> ok
<kspencer> thanks adam12
dviola has joined #ruby
belmoussaoui has quit [Read error: Connection reset by peer]
cfec0b8d has joined #ruby
aidalgol has quit [Ping timeout: 240 seconds]
jonjits[m] has quit [Ping timeout: 246 seconds]
voltai[m] has quit [Ping timeout: 276 seconds]
aviraldg has quit [Ping timeout: 276 seconds]
nankyokusei has joined #ruby
muelleme_ has joined #ruby
kp666[m] has quit [Ping timeout: 240 seconds]
M107262[m] has quit [Ping timeout: 240 seconds]
heftig has quit [Ping timeout: 255 seconds]
KevinMGranger has quit [Ping timeout: 276 seconds]
velu_aon[m] has quit [Ping timeout: 245 seconds]
Tagami[m] has quit [Ping timeout: 245 seconds]
turt2live has quit [Ping timeout: 264 seconds]
torarne has quit [Ping timeout: 276 seconds]
Giphy[m] has quit [Ping timeout: 258 seconds]
johnson[m] has quit [Ping timeout: 255 seconds]
el_ocho[m] has quit [Ping timeout: 255 seconds]
intermo[m] has quit [Ping timeout: 255 seconds]
ascarter has joined #ruby
testnick[m] has quit [Ping timeout: 246 seconds]
dman[m] has quit [Ping timeout: 246 seconds]
j0bk has joined #ruby
patarr_ has joined #ruby
nankyokusei has quit [Ping timeout: 258 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
patarr has quit [Ping timeout: 240 seconds]
omab has joined #ruby
pb122 has quit [Ping timeout: 268 seconds]
username has quit [Ping timeout: 260 seconds]
anisha has quit [Quit: This computer has gone to sleep]
cadillac__ has quit [Ping timeout: 255 seconds]
minimalism has joined #ruby
govg has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
govg has joined #ruby
omab has quit [Remote host closed the connection]
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has quit [Remote host closed the connection]
patarr_ has quit [Ping timeout: 240 seconds]
hutch34 has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
cdg has joined #ruby
arup_r has joined #ruby
blackwind_123 has quit [Ping timeout: 240 seconds]
xall has quit [Quit: xall]
mtkd has quit [Read error: Connection reset by peer]
mtkd has joined #ruby
blackwind_123 has joined #ruby
govg has quit [Ping timeout: 240 seconds]
Bounga has joined #ruby
gusrub has quit [Remote host closed the connection]
govg has joined #ruby
sekmo has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
sekmo has quit [Client Quit]
jenrzzz has quit [Ping timeout: 246 seconds]
Bounga has quit [Ping timeout: 240 seconds]
cadillac_ has joined #ruby
jakew has joined #ruby
jakew has quit [Client Quit]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
lacuna has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
osboxes has joined #ruby
osboxes has quit [Client Quit]
ketan has joined #ruby
blackwind_123 has quit [Ping timeout: 258 seconds]
hobodave has joined #ruby
<ivanskie> so quiet
patarr has joined #ruby
blackwind_123 has joined #ruby
ketan has quit [Ping timeout: 240 seconds]
skweek has joined #ruby
blackwind_123 has quit [Ping timeout: 258 seconds]
skweek has quit [Max SendQ exceeded]
skweek has joined #ruby
patarr has quit [Ping timeout: 240 seconds]
blackwind_123 has joined #ruby
cdg_ has joined #ruby
patarr has joined #ruby
eightlimbed has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
cadillac_ has quit [Remote host closed the connection]
cdg has quit [Ping timeout: 255 seconds]
mtkd has quit [Read error: Connection reset by peer]
hosttor has joined #ruby
mtkd has joined #ruby
lxsameer has joined #ruby
<arup_r> 👻
ec is now known as purr
purr is now known as elliottcable
eightlimbed has joined #ruby
latemus has joined #ruby
khaki has quit [Ping timeout: 260 seconds]
workmad3 has quit [Ping timeout: 260 seconds]
mtkd has quit [Read error: Connection reset by peer]
^mtkd has joined #ruby
lacuna has joined #ruby
gnufied has quit [Ping timeout: 246 seconds]
GinoMan has joined #ruby
GinoMan1423 has quit [Ping timeout: 246 seconds]
patarr has quit [Ping timeout: 255 seconds]
cadillac_ has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ResidentBiscuit has quit [Read error: Connection reset by peer]
lacuna has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
patarr has joined #ruby
cadillac_ has quit [Remote host closed the connection]
blackwind_123 has quit [Ping timeout: 258 seconds]
santoxxcc has joined #ruby
lacuna has joined #ruby
igniting has joined #ruby
khaki has joined #ruby
solocshaw has joined #ruby
<santoxxcc> hello
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> hi
blackwind_123 has joined #ruby
lacuna has quit [Client Quit]
gnufied has joined #ruby
muelleme_ has quit [Ping timeout: 246 seconds]
<santoxxcc> can i ask things about rhe ruby language sometimes right? i'm newbie
<santoxxcc> the*
<Zarthus> you could even ask about ruby, the gem
<Zarthus> chances are you'll find people here who know more about the programming language than the gem though
<santoxxcc> so if i want to talk about the gem and not about the language i'm not in the right place right? jaja
JoshS has joined #ruby
<santoxxcc> just kidding
bauruine has quit [Ping timeout: 240 seconds]
ResidentBiscuit has joined #ruby
<santoxxcc> ok is nice to count on you guys
<santoxxcc> i guess
<Zarthus> the real question is how many questions can you think of regarding the gem
patarr has quit [Ping timeout: 240 seconds]
blackwind_123 has quit [Ping timeout: 258 seconds]
<elomatreb> How about 1. Where can I find some, I hear they're rather valuable
<j0bk> hi I have a doubt about the ruby gem
<j0bk> (joking)
<santoxxcc> i wish that the rocks in my garden were ruby gems :(
<kspencer> Id like some gems to pay off my student loans
blackwind_123 has joined #ruby
<Zarthus> no amount of gems can pay off your crippling debts, kspencer
<havenwood> open $(gem search "^ruby$" -d | ag Homepage | sed -e 's/^[[:space:]]*//' | cut -d" " -f2)
<santoxxcc> damn
<santoxxcc> i still green
<santoxxcc> better start to read
bauruine has joined #ruby
dlitvak has joined #ruby
<santoxxcc> just to get out of doubts
<santoxxcc> what does the code from above?
<kspencer> Zarthus: I've only got 1300ish a few gems should take care of it
<Zarthus> That's pretty nice.
KeyJoo has joined #ruby
<Zarthus> kspencer: A wild guess is that it opens a bunch of pages in your browser
<Zarthus> i'm not familiar with ag nor open
<Zarthus> ah open is a file
<santoxxcc> but i looks that it searchs for something
<havenwood> Zarthus: It opens just that gem's website.
<havenwood> Zarthus: ag is the silver searcher
__Yiota has joined #ruby
<havenwood> Zarthus: brew install ag
ur5us has joined #ruby
gothicsouth has joined #ruby
<havenwood> You could swap grep for ag there.
<Zarthus> Neat.
Bounga has joined #ruby
<havenwood> It's just slower and less intuitive than ag, a newer but very nice option.
Emmanuel_Chanel has quit [Quit: Leaving]
<Zarthus> The command name is 33% shorter than ack, and all keys are on the home row!
blackwind_123 has quit [Ping timeout: 258 seconds]
<Zarthus> I'm convinced.
<havenwood> function gem_site() { open $(gem search "^$1$" -d | grep Homepage | sed -e 's/^[[:space:]]*//' | cut -d" " -f2) }
<havenwood> gem_site YOUR_GEM_HERE
<santoxxcc> in the book that i'm reading says that te ruby community is ver nice and friendly
jaruga_________ has joined #ruby
<santoxxcc> the*
<havenwood> Zarthus: ^ there, ag removed
<havenwood> err, gem_site
<havenwood> gem_website http
<havenwood> and a function to call for any gem
<havenwood> whatever you want to call the function
<havenwood> Or you could do it in Ruby. ;-P
<havenwood> This isn't #shell after all.
* havenwood scolds himself
<Zarthus> You could write a sh parser in ruby and pretend it was normal all along
mostlybadfly has joined #ruby
Bounga has quit [Ping timeout: 240 seconds]
patarr has joined #ruby
Emmanuel_Chanel has joined #ruby
ornerymoose has quit [Ping timeout: 268 seconds]
santoxxcc has quit [Read error: Connection reset by peer]
santoxxcc has joined #ruby
<santoxxcc> hi
<santoxxcc> anyone know Matz in here?
<ivanskie> not i
<ivanskie> but can someone tell me what im doing wrong here?
hobodave_ has joined #ruby
<ivanskie> {{skiplist.map{|s|row[col]==s}}.include?(true)}
<havenwood> santoxxcc: Lots of folk in here have met Matz. He's nice.
<santoxxcc> I would like to meet him some day
solocshaw has quit [Ping timeout: 255 seconds]
username has joined #ruby
<santoxxcc> even if is in chat
eightlimbed has quit [Ping timeout: 258 seconds]
<havenwood> ivanskie: use #any?
<j0bk> ivanskie what's the error?
<havenwood> santoxxcc: Come to RubyConf in New Orleans this Fall.
cadillac_ has joined #ruby
<havenwood> santoxxcc: Or drop by the mruby gitter.
<havenwood> santoxxcc: https://gitter.im/mruby/mruby
<ivanskie> unexpected '}', expectin +> syntax error
poloych has joined #ruby
<j0bk> the last }
<j0bk> ?
<santoxxcc> havenwood: i'll check it out, thanks!
hobodave has quit [Ping timeout: 258 seconds]
nerglish has joined #ruby
<santoxxcc> let me try that code
<santoxxcc> wait
<santoxxcc> let me see it
dances_with_taco has quit [Read error: Connection reset by peer]
<j0bk> no
<j0bk> the error is }}.
<j0bk> you need just one
<santoxxcc> that's true
<santoxxcc> :v
<j0bk> }}.include? -> }.include?
<nerglish> If I have a rake task defined astask process: :environment do
<nerglish> what does :environment do here?
<j0bk> RAKE_ENV
<baweaver> loads the entirety of Rails with it.
<baweaver> though #RubyOnRails may be a better place to ask.
hosttor has quit [Ping timeout: 240 seconds]
<nerglish> oh, thanks
<santoxxcc> skiplist.map {|s| row[col] == s}.include?() i think should be
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<santoxxcc> i'm newbie anyway
<havenwood> ivanskie: You can use #any? something like: skips.any? { |skip| skip == row[col] }
<havenwood> but the logic is so simple, why not just include?
arup_r has quit []
<havenwood> skiplist.include? r
<ivanskie> lol wait what
<havenwood> ivanskie: ^ just that, nothing else (if this is really all your logic)
<ivanskie> you mean i've been an idiot this whole time
<ivanskie> lol
<ivanskie> wow
<santoxxcc> i don't get it
<santoxxcc> why just skiplist.include?
<ivanskie> this is something i was working on earlier.
<ivanskie> originally i had a row from csv. i iterated over every single thing in that row, and checked against everything in skiplist.
<havenwood> santoxxcc: With the more convoluted one you're doing stuff you don't need to like: [true, true, false, false, true].include? true
<ivanskie> then later decided only need to do it for one column. but in my head still stick to doing the old logic
<ivanskie> this does it right
<havenwood> santoxxcc: All that's actually being done is to see if the skiplist includes r, whatever that is.
<ivanskie> look at screenshot.
dances_with_taco has joined #ruby
<ivanskie> i have a list of crap to ignore (skiplist).. im processing up-to 5 csv files at a time and saving into single csv file, while making sure to skip the crap that i dont need
jrafanie has joined #ruby
<santoxxcc> havenwood so you are just checking if "r" exist inside the array? that's all the logic?
<ivanskie> so yes
xenops has quit [Quit: Textual IRC Client: www.textualapp.com]
<ivanskie> r is a single string
pupsicle has joined #ruby
<apeiros> if you repeatedly check whether something exists in an array, you should consider using a set for the test
<santoxxcc> then i suppose you want to ignore some elements in another array so you could just use reject to create a new array with usefull elements
<santoxxcc> like when developing a sumaryzer
<ivanskie> before i was passing the whole row, and doing. row.each do r -- skiplist.each do s. if r==s -- skip. and it wasnt working... now i just do. skiplistinclude?(row[1])
bmurt has joined #ruby
<ivanskie> apeiros set?
<apeiros> &ri Set ivanskie
eightlimbed has joined #ruby
poloych has quit [Remote host closed the connection]
<ivanskie> hm. could do. but would have to convert each row from csv into set and do that check, then push it into the new csv file
<ivanskie> this way its organically array in array out
<ivanskie> block above sits inside CSV.process array of arrays
<apeiros> um,no?
<apeiros> as I understood it you have one array which remains the same, and you test each row of the csv whether one cell of it is in said constant array. no?
<santoxxcc> i understand that too
<apeiros> haven't looked at your code yet, though. so maybe I misunderstood what I read.
roshanavand has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
<apeiros> wow, you call the variable referencing the csv handle "row"?
<ivanskie> apeiros that is what im doing now after havenwood'ssuggestion
<apeiros> that's mighty misleading…
<ivanskie> no
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<apeiros> yes
<ivanskie> everything got confused here
<ivanskie> in gist i called it row[1]
<apeiros> no. see link.
doublemalt_ has joined #ruby
<apeiros> line 20 of your gist.
__Yiota has joined #ruby
<apeiros> oh, repo-file actually
<apeiros> I'm not talking about line 47.
<ivanskie> line 20 there is not related to this question
cadillac_ has quit [Remote host closed the connection]
<apeiros> I wasn't saying it was related to your question
<j0bk> dat 75 lines def :P
<ivanskie> wait but line 20 that is a row
<apeiros> no it's not
hutch34 has joined #ruby
<ivanskie> then i don't understand how ruby works with CSV lines
nankyokusei has joined #ruby
cfec0b8d has quit [Quit: Leaving]
benlieb has quit [Quit: benlieb]
<apeiros> the way you use it
<apeiros> csv << line
meshsmith has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
<ivanskie> row.inspect. would be [] with each value in csv
<apeiros> you don't call your arrays "array_item << item"
bauruine has quit [Ping timeout: 240 seconds]
<ivanskie> apeiros you are correct, but i believe there's been a miscommunication
<apeiros> I believe there's been a misnaming :-p
<ivanskie> misnaming when explaining my problem
<j0bk> I believe #ufo
<ivanskie> #ufo is coming
<apeiros> ivanskie: as you stated yourself, it's unrelated to your problem
<ivanskie> reset hard
<j0bk> --hard
<j0bk> guys what's the question?
<ivanskie> reset --hard. (thanks)
<apeiros> 42
<ivanskie> found a solution. apeiros is now suggesting to use set instead of map on array
<j0bk> if contents.length == 0 that?
bauruine has joined #ruby
<apeiros> ivanskie: @skiplist
<ivanskie> turn skiplist into set
<apeiros> yes
<ivanskie> ultimately its just semantics though right?
<apeiros> also your naming is wrong
santoxxcc has quit [Read error: Connection reset by peer]
<ivanskie> where
<ivanskie> not line 20
<apeiros> you have it skipList once and skiplist another place
<ivanskie> oh
<ivanskie> yes
<apeiros> ruby's variable names are case sensitive
nankyokusei has quit [Ping timeout: 258 seconds]
<ivanskie> i blame my workflow
santoxxcc has joined #ruby
<ivanskie> i can explain if you care
<santoxxcc> exit
<apeiros> well, yeah, line 20 too, but that's about csv vs. row.
<santoxxcc> :c
<apeiros> i.e. that's a semantical misnaming
<apeiros> ivanskie: I don't
<santoxxcc> quit
<santoxxcc> :c
<santoxxcc> damn
<j0bk> santoxxcc wrong window :P
<apeiros> santoxxcc: need help? :-p
<j0bk> do you want to close? /quit
<santoxxcc> yes :c
<apeiros> santoxxcc: try /quit
<santoxxcc> thanks
santoxxcc has quit [Client Quit]
<ivanskie> apeiros thanks. i'll go back and clean up everything once i confirm the thing works and change skiplist to set
<apeiros> good luck :D
<apeiros> once it runs, write some tests. then try to get it to readable code ;-)
<j0bk> ivanskie use OOP
d10n-work has quit [Quit: Connection closed for inactivity]
<j0bk> that looks like a bash script
<ivanskie> where did you find skipList?
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<j0bk> def fetchMaps(uids, savepath, skipList=[])
<ivanskie> ah thank you
ascarter has joined #ruby
<j0bk> apeiros you are the most patient guy around the universe
uZiel has quit [Ping timeout: 248 seconds]
<apeiros> j0bk: thanks. sadly not always, though
enterprisey has quit [Remote host closed the connection]
latemus has quit [Quit: leaving]
GinoMan has quit [Ping timeout: 246 seconds]
elifoster has quit [Ping timeout: 268 seconds]
<ivanskie> j0bk i'm trying
<ivanskie> j0bk open to suggestions
<ivanskie> this is the most "ambitious" ruby program i've written to date.
<ivanskie> outside of any rails stuff
patarr has quit [Ping timeout: 246 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ivanskie> and its broken again
ldnunes has quit [Quit: Leaving]
latemus has joined #ruby
__Yiota has joined #ruby
<ivanskie> ok so skiplist sits inside Site class, and populated when Site is initialized from config file.
<ivanskie> thought i could just access it from Device class without passing to my method everytime i run it
patarr has joined #ruby
antgel_ has joined #ruby
<ivanskie> with activemodel it'd be easy.
Bounga has joined #ruby
<ivanskie> but i haven't learned how to use class / modules properly yet
<apeiros> good opportunity then
jrafanie has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> you should also learn about scopes it seems
<apeiros> scopes = boundaries of where variables are accessible
<ivanskie> scopes between class and modules.
<ivanskie> yea
<apeiros> scopes *of things
<ivanskie> wait no
<ivanskie> i see what i did wrong here
<j0bk> var = "hello"; things.each{ |var| puts var}; puts var
<j0bk> like this
<ivanskie> eh?
<j0bk> scopes
<j0bk> var lives inside and outside of the each
<apeiros> also "where can I access which @instance_variable"
Bounga has quit [Ping timeout: 240 seconds]
<apeiros> Device's @skiplist seems unused f.ex.
<ivanskie> yeah im good with scopes between blocks or methods and inside modules etc..
<ivanskie> you are right i just removed it a bit earlier
<ivanskie> okay so.. in my program. each site object has multiple device objects.. thought i realize not in the same way as activemodel does it.
patarr has quit [Ping timeout: 255 seconds]
<ivanskie> damn i need to get out of rails in my head lol
<ivanskie> i learned rails before ruby
enterprisey has joined #ruby
<ivanskie> messing me up a bit
<ivanskie> i want to do Site.skiplist
<apeiros> that'd be a class method
<j0bk> def Site.skiplist; end
<j0bk> or self.skiplist
* apeiros prefers the latter
<j0bk> yep for refactors
<j0bk> ;)
<ivanskie> and would work if this was activemodel. but i dont have that relationship between device and site. @devices is just an array of objects inside Site object. so i can't do Parent.skiplist
ketan has joined #ruby
<apeiros> j0bk: also for grep and less typing
<apeiros> o0
<apeiros> Parent?
<ivanskie> i have class Device < Site. but honestly i dont know what im doing there and if it even makes any sense at all
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ivanskie> multiple sites, each site has multiple devices
<apeiros> you say that Device is a subclass of Site
<apeiros> then no, that doesn't make sense
<j0bk> ivanskie what do you want to do?
<ivanskie> j0bk was talking about doing OOP. thats what im trying to do here
<apeiros> inheritance means "it's similar in its shape"
d10n-work has joined #ruby
Tagami[m] has joined #ruby
<ivanskie> yes and device has nothing in common with site in that regard.
ecuanaso has joined #ruby
<apeiros> then don't inherit
<j0bk> yes, but you need to think what do you want to model before thinking in OOP
<ivanskie> in my mind if i pass @skiplist to every device, or everytime i run fetchMaps method on each device.. its inefficient. im thinking @skiplist is common thing between all devices per each site. so one site -- one skiplist.
bmurt has joined #ruby
hobodave_ has quit [Quit: Computer has gone to sleep.]
<apeiros> so class Site has an instance variable @skiplist
<ivanskie> yes
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<apeiros> and Site has an instance variable @devices
<apeiros> one site, many devices, right?
<ivanskie> yes
<apeiros> now you just need the proper datatype of @devices
<ivanskie> so i should make class Devices
<apeiros> Array and Hash are the common collection classes
<apeiros> maybe
ketan has quit [Ping timeout: 258 seconds]
<apeiros> most people are too lazy to write their own collection classes, but it'd often make sense.
<ivanskie> this is a simple problem case here so dont need to over complicate it. but im trying to learn ruby not just write a dirty scrip that does the job
<apeiros> I do tend to call them DeviceList or something else more explicit, since people tend to miss the difference between Device and Devices
bmurt has quit [Client Quit]
<ivanskie> i've spent about 4 days on this so far
<apeiros> &ri SimpleDelegator ivanskie
<apeiros> &ri Forwardable ivanskie
<apeiros> those are useful to implement your own collection classes
bauruine has quit [Ping timeout: 255 seconds]
__Yiota has joined #ruby
<apeiros> but yeah, I'd probably not focus on collection classes yet
<apeiros> write the scalar classes first
<ivanskie> k going to do device.fetchMaps(@uids, @savepath, @skiplist) for now. just to get the project going (i actually need to do something with the end csv for work lol). then practice this
<ivanskie> ok looks like that fixed it.
<apeiros> uh, no
<apeiros> oh
<apeiros> ok, maybe yes :)
<j0bk> :P
<ivanskie> if this was rails i'd just do device.fetchMaps and that'd inherit the instance variables of the site that it belongs to
enterprisey has quit [Remote host closed the connection]
<apeiros> no, rails doesn't inherit ivars either
<ivanskie> well
<apeiros> no idea where you have that from :)
ski4x7 has joined #ruby
bauruine has joined #ruby
<apeiros> it does have inheritable ivars. but that's a different thing.
ski4x7 has quit [Read error: Connection reset by peer]
<j0bk> ActiveRecord != Rails; classes != models
<ivanskie> i mean to say that.. i'd have access to device.site.skiplist
<apeiros> through the relation, yes
<ivanskie> yes
<apeiros> and that one doesn't happen magically either
<ivanskie> no.
<apeiros> what do you think rails does behind the scenes? :)
<ivanskie> maaaagicccc
<ivanskie> mushrooms
<apeiros> no. argument passing.
ski7777 has quit [Ping timeout: 240 seconds]
cadillac_ has joined #ruby
ski4x7 has joined #ruby
<apeiros> and it's got nothing to do with inheritance. at all.
<ivanskie> so essentially. device gets site and its ivars
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> not really.
<ivanskie> i should take a look at activerecord
<apeiros> device's class knows it's got a relation to site and provides a method to access the related site.
haylon has quit []
<apeiros> you still have to go through site to get the skiplist. you don't have it in device itself.
patarr has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ivanskie> what you said above about classes!=models. it took me a few to figure out what difference between class and methods is. and still in my head class is a model (trying to break that).
Guest85918 has joined #ruby
johnson[m] has joined #ruby
kp666[m] has joined #ruby
torarne has joined #ruby
M107262[m] has joined #ruby
heftig has joined #ruby
intermo[m] has joined #ruby
jonjits[m] has joined #ruby
aviraldg has joined #ruby
voltai[m] has joined #ruby
turt2live1 has joined #ruby
dman[m] has joined #ruby
KevinMGranger has joined #ruby
Giphy[m] has joined #ruby
<apeiros> actually j0bk said that ;-)
ski4x7 has quit [Client Quit]
testnick[m] has joined #ruby
velu_aon[m] has joined #ruby
el_ocho[m] has joined #ruby
<ivanskie> okwhen j0bk said that
<ivanskie> ya
<apeiros> (they're right, of course, though models < classes)
<j0bk> models < Object == "classes"
<apeiros> o0
<apeiros> no, models are classes
<apeiros> that's what I meant
<j0bk> yes
<apeiros> ok :)
ski7777 has joined #ruby
quobo has joined #ruby
<ivanskie> thats how i got that
<ivanskie> class ModelName
<ivanskie> which then inherits from application::activerecord if i remember correctly
hutch34 has quit [Ping timeout: 255 seconds]
<apeiros> ActiveRecord::Base
<ivanskie> right
<apeiros> or any subclass thereof
<ivanskie> this is a great excercise
patarr has quit [Ping timeout: 240 seconds]
<ivanskie> the ruby code was writing.
<ivanskie> spend 4 days, to save 2 hours
<ivanskie> now it does it what i need it to do in 2mins
def_jam has quit [Read error: Connection reset by peer]
eblip has quit [Read error: Connection reset by peer]
<ivanskie> 24 devices, each 3-5 csv files.. and these 3-5 files would have to be renamed or put in its own folder, etc etc. now just run code --> 24 ready csv files.
<ivanskie> then need to add code to zip it and a couple other files, and then can just email the zip file to schneider
<apeiros> shouldn't it be 72-120 csv files?
ResidentBiscuit has quit [Read error: Connection reset by peer]
<apeiros> 24x(3-5)
<ivanskie> if done manually yes
eblip has joined #ruby
def_jam has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ivanskie> here's what this is. have 24 PDUs, these have APC PowerXpertGateway nic cards in them, each PDU has two breaker panels, each panel has up to 40 breakers. each is measured. now we need to access this info in a DCIM tool. but DCIM tool needs a device definition file, which says how to talk to said device, and which sensors (or data points) to import.
SeepingN has joined #ruby
<ivanskie> so easier way would be SNMP, but these devices don't output all the data in SNMP, but do output complete data to MODBUS
<ivanskie> modbus is old, u have to send packet [command, unit id, register]
<ivanskie> so you have register map tables.
<ivanskie> all that just to explain that each of those. 5 files is a register map for specific unit id. and unit id is mentioned in file name. but otherwise each csv file has the same structure
__Yiota has joined #ruby
doublemalt_ has quit [Ping timeout: 240 seconds]
<ivanskie> so what im doing here is, downloading each file, injecting unit id, and combining all into a single csv file.
<ivanskie> so instead of 72-120 csv files, we get 24
<ivanskie> skiplist was an afterthought because, schneider came back and said. uhm we can't do more than 1000 sensors per device for performance reasons.
__Yiota has quit [Client Quit]
* ivanskie facepalm
gusrub has joined #ruby
<ivanskie> now that i have these 24 files, and filtered to less than 800 data points each now. i can send to schneider and wait for them to make a device definition file for us..
__Yiota has joined #ruby
Fernando-Basso has quit [Quit: WeeChat 1.8]
<ivanskie> need this script/program because if someone changes/moves/adds/removes a breaker, have to repeat the above process
<ivanskie> hense the need for my app
roshanavand has quit [Ping timeout: 255 seconds]
<apeiros> sounds like something fun to write :)
<ivanskie> only if it didn't take 4 days.
<ivanskie> i was starting to get burnout
<ivanskie> get burntout
<apeiros> burned out?
<ivanskie> ty
hutch34 has joined #ruby
dionysus69 has quit [Quit: dionysus69]
Guest85918 has quit [Changing host]
Guest85918 has joined #ruby
<ivanskie> this whole thing started with trying to write a powershell script because i can't install ruby on corp machines.
<ivanskie> shit didn't work, not as experienced in powershell.
<ivanskie> so then manager said fine do what u need to do.
dionysus69 has joined #ruby
<ivanskie> then took a day to figure out that i need digestauth and not simpleauth
__Yiota has quit [Client Quit]
<ivanskie> one thing after another basically
ledestin has joined #ruby
<ivanskie> once you spend more time on trying to solve the problem in code, than it would take you to do manually.. you get stress.
ecuanaso has joined #ruby
patarr has joined #ruby
<ivanskie> whew. now i can start refactoring and cleaning the shit code up.
<ivanskie> i'm a wannabe ruby/rails/js web developer...
dionysus69 has quit [Client Quit]
dionysus69 has joined #ruby
<ivanskie> i wonder if this counts as junior dev.
patarr has quit [Ping timeout: 260 seconds]
gusrub has quit [Remote host closed the connection]
gusrub has joined #ruby
AnoHito has quit [Quit: Leaving]
FastJack has quit [Read error: Connection reset by peer]
hutch34 has quit [Ping timeout: 255 seconds]
FastJack has joined #ruby
<apeiros> probably?
konsolebox has quit [Ping timeout: 268 seconds]
__Yiota has joined #ruby
<ivanskie> just pushed working code
<apeiros> gn8
<ivanskie> ?
<ivanskie> oh
<ivanskie> gn8
<ivanskie> thank you
<ivanskie> oh yeah also have multiple sites
patarr has joined #ruby
__Yiota has quit [Ping timeout: 246 seconds]
konsolebox has joined #ruby
Bounga has joined #ruby
DLSteve_ has quit [Quit: All rise, the honorable DLSteve has left the channel.]
segy has quit [Quit: ZNC - http://znc.in]
Bounga has quit [Ping timeout: 255 seconds]
patarr has quit [Ping timeout: 260 seconds]
Cohedrin has quit [Read error: Connection reset by peer]
cschneid_ has joined #ruby
cschneid_ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
TomyLobo has quit [Ping timeout: 255 seconds]
Uranio has joined #ruby
cdg_ has quit [Remote host closed the connection]
Cohedrin has joined #ruby
segy has joined #ruby
ddffg has joined #ruby
segy has quit [Client Quit]
<ivanskie> wondering why its so quiet, then remembered its friday.
<ivanskie> Happy Friday everybody!
gothicsouth has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jjunior_ has joined #ruby
ur5us has quit [Remote host closed the connection]
muelleme_ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
gizmore has quit [Read error: Connection reset by peer]
ltem has quit [Quit: Leaving]
polishdub has quit [Quit: Leaving]
gusrub has quit [Remote host closed the connection]
AnoHito has joined #ruby
eb0t has joined #ruby
segy has joined #ruby
ddffg has quit [Ping timeout: 240 seconds]
eb0t_ has joined #ruby
santoxxcc has joined #ruby
<santoxxcc> Hi!
muelleme_ has quit [Ping timeout: 268 seconds]
def_jam has quit [Ping timeout: 260 seconds]
<santoxxcc> i don't know if this can be done
<santoxxcc> first_name, last_name = name.split(/\s+/)
<santoxxcc> is that ok?
eblip has quit [Ping timeout: 260 seconds]
<Papierkorb> ?try
<ruby[bot]> Why don't you try it and see for yourself?
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<ivanskie> i've seen something like that done actually
<santoxxcc> Correct me if i'm wrong, but the fist element of the array that is the value is going to the first_name and the next element to last_name
<santoxxcc> ?
brent__ has quit [Remote host closed the connection]
<baweaver> you're assuming a lot santoxxcc
<santoxxcc> sorry
<baweaver> what if they have a name like Dr. Bill White
<baweaver> or William Cumberbatch III
<santoxxcc> wouldn't work?
<santoxxcc> jaja
<ivanskie> yes
<ivanskie> first_name, last_name = name.split(/\s+/)
<baweaver> split on spaces will give you however many words are there
brent___ has joined #ruby
<baweaver> but only capture the first two
<baweaver> so in my case, Brandon A Weaver, it'd be first name Brandon last name A
<baweaver> which is incorrect.
jaruga_________ has quit [Quit: jaruga_________]
<santoxxcc> i see...
elifoster has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
<santoxxcc> so would be like 4 placeholders?
<baweaver> names are fun.
<Papierkorb> (^ noooot)
<santoxxcc> D:
<Papierkorb> santoxxcc: to make matters even more fun, rarely, but some ppl don't even have nor first or no last name at all. Ask the user for both separately
<Papierkorb> santoxxcc: not to mention that some people have multiple last names, so you can't even get away with assuming that all but the last word are first names
<baweaver> See: India
skweek has quit [Ping timeout: 240 seconds]
brent___ has quit [Ping timeout: 260 seconds]
<baweaver> they inherit a ton of family names in some cases.
<santoxxcc> so
<santoxxcc> i should make code for all those cases?
<baweaver> Make a text field for last and first names
<baweaver> let them figure it out, that's the easy path
<santoxxcc> like a if..elsif construct?
nankyokusei has joined #ruby
<santoxxcc> Then i'll ask the user to only put first and last names
zepy_aq has joined #ruby
meshsmith has quit [Remote host closed the connection]
gothicsouth has joined #ruby
<santoxxcc> what's better? use initialize() to define object variables or use attr_accessor?
eightlimbed has quit [Ping timeout: 255 seconds]
santoxxcc has quit [Read error: Connection reset by peer]
<baweaver> Read on what both of them do.
<Papierkorb> santoxxcc: Both do different things. In #initialize you can initialize @instance vars to some value (hence the name), with attr_accessor and friends you define accessor methods to those instance variables
santoxxcc has joined #ruby
hutch34 has joined #ruby
nankyokusei has quit [Ping timeout: 246 seconds]
herbmillerjr has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
bauruine has quit [Ping timeout: 240 seconds]
belmoussaoui has joined #ruby
sneakerhax has joined #ruby
bauruine has joined #ruby
eightlimbed has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
postmodern has joined #ruby
t-recx has joined #ruby
Cohedrin has joined #ruby
cschneid_ has quit [Remote host closed the connection]
helpa-bot has joined #ruby
Truenigma has joined #ruby
helpa-bot has quit [Remote host closed the connection]
helpa-bot has joined #ruby
utkarsh_ has joined #ruby
t-recx_ has joined #ruby
Kug3lis_ has joined #ruby
m4rCsi has joined #ruby
P1ro_ has joined #ruby
tw1sted_ has joined #ruby
t-recx has quit [Disconnected by services]
ahuman has joined #ruby
t-recx_ is now known as t-recx
helpa-bot has quit [Remote host closed the connection]
musl_ has joined #ruby
helpa-bot has joined #ruby
psychicist__ has quit [Ping timeout: 268 seconds]
abort has joined #ruby
devyn_ has joined #ruby
Sp4rKy_ has joined #ruby
lucas has joined #ruby
lxsameer has quit [Quit: WeeChat 1.7]
_mak has joined #ruby
montyboy_ has joined #ruby
santoxxc1 has joined #ruby
chaos95_ has joined #ruby
swills_ has joined #ruby
PaulCapestany has quit [Quit: .]
ejnahc_ has joined #ruby
matled- has joined #ruby
helpa-bot has quit [Remote host closed the connection]
helpa-bot has joined #ruby
Bounga has joined #ruby
ishigoya- has joined #ruby
helpa-bot has quit [Remote host closed the connection]
sindork_ has joined #ruby
dyyylan- has joined #ruby
tekmaster has joined #ruby
synstack_ has joined #ruby
synstack_ has joined #ruby
synstack_ has quit [Changing host]
tomaw| has joined #ruby
swistak35_ has joined #ruby
_Tristan-Speccy_ has joined #ruby
Disavowed_ has joined #ruby
helpa-bot has joined #ruby
shortdudey123_ has joined #ruby
Radar_ has joined #ruby
elem has joined #ruby
<santoxxc1> what's good for the brain pain?
belmoussaoui has quit [*.net *.split]
santoxxcc has quit [*.net *.split]
kies has quit [*.net *.split]
Kug3lis has quit [*.net *.split]
Guest66963 has quit [*.net *.split]
d^sh has quit [*.net *.split]
borei1 has quit [*.net *.split]
BTRE has quit [*.net *.split]
cout has quit [*.net *.split]
al2o3-cr has quit [*.net *.split]
helpa has quit [*.net *.split]
devyn has quit [*.net *.split]
tekacs has quit [*.net *.split]
seggy has quit [*.net *.split]
swills has quit [*.net *.split]
Guest61596 has quit [*.net *.split]
Sammichmaker has quit [*.net *.split]
SuperLag has quit [*.net *.split]
shortdudey123 has quit [*.net *.split]
_mak_ has quit [*.net *.split]
ejnahc has quit [*.net *.split]
scorphus` has quit [*.net *.split]
nchambers has quit [*.net *.split]
synstack has quit [*.net *.split]
abort_ has quit [*.net *.split]
Radar has quit [*.net *.split]
Guest4061 has quit [*.net *.split]
Truenigma_Work has quit [*.net *.split]
cajone has quit [*.net *.split]
P1ro has quit [*.net *.split]
xMopxShell has quit [*.net *.split]
matled has quit [*.net *.split]
nicoulaj46 has quit [*.net *.split]
utkarsh has quit [*.net *.split]
vqrs has quit [*.net *.split]
musl has quit [*.net *.split]
nathani has quit [*.net *.split]
montyboy has quit [*.net *.split]
theRoUS has quit [*.net *.split]
Tristan-Speccy has quit [*.net *.split]
ahuman_ has quit [*.net *.split]
reinh1 has quit [*.net *.split]
lucas__ has quit [*.net *.split]
swistak35 has quit [*.net *.split]
Raboo has quit [*.net *.split]
Disavowed has quit [*.net *.split]
Sp4rKy has quit [*.net *.split]
tw1sted has quit [*.net *.split]
dyyylan has quit [*.net *.split]
phreakocious has quit [*.net *.split]
FifthWall has quit [*.net *.split]
maxmanders has quit [*.net *.split]
ishigoya has quit [*.net *.split]
chaos95 has quit [*.net *.split]
ekem has quit [*.net *.split]
sindork has quit [*.net *.split]
michael_mbp has quit [*.net *.split]
m4rCsi_ has quit [*.net *.split]
tomaw has quit [*.net *.split]
tekmaster is now known as tekacs
perryh is now known as perry
matled- is now known as matled
Sp4rKy_ is now known as Sp4rKy
FifthWall_ has joined #ruby
IceDragon has joined #ruby
FifthWall_ is now known as FifthWall
dionysus69 has quit [Ping timeout: 240 seconds]
theRoUS has joined #ruby
d^sh has joined #ruby
phreakocious has joined #ruby
nchambers has joined #ruby
Sp4rKy is now known as Guest6064
IceDragon is now known as Guest83229
shortdudey123_ is now known as shortdudey123
helpa-bot has quit [Remote host closed the connection]
kies has joined #ruby
helpa has joined #ruby
Guest66963 has joined #ruby
xMopxShell has joined #ruby
veloutin has quit [Ping timeout: 260 seconds]
cajone has joined #ruby
vqrs has joined #ruby
nathani has joined #ruby
al2o3-cr has joined #ruby
borei1 has joined #ruby
nuck has quit [Ping timeout: 260 seconds]
BTRE has joined #ruby
Bounga has quit [Ping timeout: 255 seconds]
cschneid_ has joined #ruby
Raboo has joined #ruby
<santoxxc1> hi
ionte has quit [Ping timeout: 240 seconds]
veloutin has joined #ruby
santoxxc1 has quit [Quit: leaving]
maxmanders has joined #ruby
reinh1 has joined #ruby
belmoussaoui has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ionte has joined #ruby
ketan has joined #ruby
cout has joined #ruby
cschneid_ has quit [Ping timeout: 268 seconds]
michael_mbp has joined #ruby
ketan has quit [Ping timeout: 246 seconds]
BTRE has quit [Ping timeout: 246 seconds]
brent__ has joined #ruby
nuck has joined #ruby
hutch34 has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
brent__ has quit [Ping timeout: 246 seconds]
Qommand0r has joined #ruby
pupsicle has quit [Ping timeout: 240 seconds]
pupsicle has joined #ruby
nitric has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
Bhootrk_ has joined #ruby
Cohedrin has joined #ruby
elifoster has quit [Ping timeout: 260 seconds]
gothicsouth has joined #ruby