baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.1, 2.4.4, 2.3.7, 2.6.0-preview2: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
despai has quit [Ping timeout: 240 seconds]
akem has quit [Client Quit]
alex`` has quit [Quit: WeeChat 2.2]
akem has joined #ruby
desperek has quit [Quit: xoxo]
Azure|dc has joined #ruby
Azure|dc has quit [Read error: Connection reset by peer]
Azure has quit [Ping timeout: 250 seconds]
Azure has joined #ruby
thejs has quit [Remote host closed the connection]
arescorpio has joined #ruby
Azure has quit [Ping timeout: 252 seconds]
Azure|dc has joined #ruby
jcarl43 has quit [Quit: WeeChat 2.2]
DTZUZO has quit [Ping timeout: 245 seconds]
ArahaelPi has quit [Ping timeout: 252 seconds]
bmurt has joined #ruby
wildermind has quit [Quit: Connection closed for inactivity]
akaiiro has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
lxsameer has joined #ruby
apeiros has quit [Ping timeout: 245 seconds]
lxsameer has quit [Ping timeout: 245 seconds]
ArahaelPi has joined #ruby
ur5us has quit [Remote host closed the connection]
akaiiro has quit [Ping timeout: 240 seconds]
agent_white has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4350 has quit [Remote host closed the connection]
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
orbyt_ has quit [Ping timeout: 245 seconds]
bmurt has quit [Read error: Connection reset by peer]
dbz has joined #ruby
<scrptktty> Submitted my RubyConf scholarship~~
bmurt has joined #ruby
cagomez has joined #ruby
h0h0h0 has joined #ruby
thy0 has quit [Quit: TTFN]
sylario has quit [Quit: Connection closed for inactivity]
cagomez has quit [Read error: No route to host]
cagomez has joined #ruby
tdy has joined #ruby
esrse has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
j416 has quit [Read error: Connection reset by peer]
j416_ has joined #ruby
tdy has quit [Ping timeout: 252 seconds]
dbz has quit [Remote host closed the connection]
j416_ is now known as j416
bmurt has joined #ruby
akaiiro has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
renzhi has joined #ruby
bmurt has joined #ruby
bmurt has quit [Client Quit]
akaiiro has quit [Ping timeout: 240 seconds]
h0h0h0 has quit [Quit: Textual IRC Client: www.textualapp.com]
Rootsudo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has joined #ruby
arescorpio has quit [Remote host closed the connection]
sspreitz has quit [Ping timeout: 252 seconds]
sspreitz has joined #ruby
lxsameer has quit [Ping timeout: 252 seconds]
lemonandroid has joined #ruby
braincrash has quit [Quit: bye bye]
akaiiro has joined #ruby
braincrash has joined #ruby
akaiiro has quit [Remote host closed the connection]
dbugger_ has joined #ruby
gnufied has quit [Ping timeout: 240 seconds]
Dbugger has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
MuffinPimp has quit [Ping timeout: 252 seconds]
jane_booty_doe has quit [Quit: Leaving]
kapil___ has joined #ruby
cagomez has quit [Read error: Connection reset by peer]
cagomez has joined #ruby
MuffinPimp has joined #ruby
cagomez has quit [Read error: No route to host]
cagomez has joined #ruby
MuffinPimp has quit [Ping timeout: 252 seconds]
MuffinPimp has joined #ruby
DTZUZO has joined #ruby
dendazen has quit [Ping timeout: 246 seconds]
cagomez has quit [Remote host closed the connection]
jane_booty_doe has joined #ruby
cagomez has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
dviola has quit [Quit: WeeChat 2.2]
cagomez has quit [Ping timeout: 240 seconds]
cgfbee has quit [Ping timeout: 268 seconds]
cgfbee has joined #ruby
dogweather has joined #ruby
jjman has joined #ruby
dogweather has quit [Ping timeout: 245 seconds]
jp has quit [Ping timeout: 246 seconds]
dogweather has joined #ruby
scrptktty has quit [Quit: Connection closed for inactivity]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
troys has quit [Quit: Bye]
jp has joined #ruby
dogweather has quit [Ping timeout: 250 seconds]
dogweather has joined #ruby
dogweather has quit [Ping timeout: 240 seconds]
dogweather has joined #ruby
dionysus69 has joined #ruby
Inline has quit [Quit: Leaving]
code_zombie has joined #ruby
dogweather has quit [Ping timeout: 252 seconds]
bak1an has joined #ruby
orbyt_ has joined #ruby
reber has joined #ruby
apeiros has joined #ruby
kevinsjoberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
code_zombie has quit [Quit: Leaving]
snickers has joined #ruby
Emmanuel_Chanel has joined #ruby
bak1an has quit [Quit: Textual IRC Client: www.textualapp.com]
aupadhye has joined #ruby
Rootsudo has joined #ruby
jamesaxl has quit [Ping timeout: 240 seconds]
akem has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kevinsjoberg has joined #ruby
Azure|dc has quit [Read error: Connection reset by peer]
kevinsjoberg has quit [Ping timeout: 250 seconds]
Azure has joined #ruby
dbz has joined #ruby
aufi has joined #ruby
dellavg_ has joined #ruby
marz_d`ghostman has joined #ruby
alex`` has joined #ruby
<marz_d`ghostman> If I want to serve a fiel generated by ruby via apache, do I need to use some framework like sinatra or RoR or can I simply use an .rb file?
yohji has joined #ruby
druonysus has quit [Quit: No Ping reply in 180 seconds.]
<baweaver> I mean you _could_ if you really wanted to with CGI extensions
<baweaver> Though it really depends what you want to do.
<baweaver> Also CGI extensions can be notoriously insecure and error prone, while being hard to debug
<marz_d`ghostman> baweaver: can you suggest anything? I want something that would look like this: http://mirror.rise.ph/
<baweaver> How much do you know about programming, and why Ruby?
<baweaver> also, what are you intending to build?
<marz_d`ghostman> baweaver: not a lot when it comes to these kind of stuff. Just a webpage serving directories/files
<marz_d`ghostman> baweaver: cause I've been using ruby on my other scripts :)
<baweaver> Then why not just run Apache in a directory?
<baweaver> That gives you pretty much that
sysvalve has joined #ruby
<apeiros> marz_d`ghostman: the lowest level I'd recommend is rack. there's rack-server-pages which provides something akin to php's experience.
<apeiros> and as baweaver mentioned, you can always use cgi/fcgi
<zenspider> *cough* webrick *cough*
<apeiros> "via apache"?
<zenspider> nah!
<baweaver> ohai zenspider
<apeiros> I mean, ok, you can configure apache as a reverse-proxy :D
<zenspider> 'lo
<zenspider> then you have two problems
<marz_d`ghostman> hmmm, maybe I'll give nodejs a try then
<apeiros> I'd be happy if I could trade what I have for as little as two problems 😂
<apeiros> marz_d`ghostman: weird reasoning, but sure, whatever fits your bill. the situation there won't differ much, though.
<marz_d`ghostman> apeiros: Will it be simple to just use sinatra?
<zenspider> node? now you have ALL the problems :P
<apeiros> define "simple". but yes, using sinatra is IMO rather simple.
<marz_d`ghostman> I guess defining simple isn't that simple, hehe. Just require sinatra, write ruby code have it serve the files, then voila!? haha, haven't tried sinatra though so I wouldn't know what I would be going through :)
ellcs has joined #ruby
* baweaver still thinks you don't need anything more than Apache directory listings
cgfbee has quit [Ping timeout: 252 seconds]
ellcs has quit [Ping timeout: 240 seconds]
za1b1tsu_ has joined #ruby
jp has quit [Ping timeout: 260 seconds]
marz_d`ghostman has quit [Quit: Page closed]
akem has joined #ruby
tristanp has joined #ruby
cgfbee has joined #ruby
tristanp has quit [Ping timeout: 260 seconds]
jp has joined #ruby
lemonandroid has quit [Read error: Connection reset by peer]
clorisu has joined #ruby
esrse has quit [Ping timeout: 245 seconds]
dbz has quit [Remote host closed the connection]
lxsameer has joined #ruby
RougeR has joined #ruby
bathtub_shark has joined #ruby
Beams has joined #ruby
bijan_ has joined #ruby
bijan_ has quit [Client Quit]
bijan_ has joined #ruby
qolq has quit [Quit: qolq]
TomyWork has joined #ruby
sylario has joined #ruby
nowhere_man has joined #ruby
GodFather has quit [Ping timeout: 250 seconds]
<dionysus69> >> price / (true ? {:price=>0.2791e3}[:price].to_d : 1)
<ruby[bot]> dionysus69: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
Sigyn has quit [Read error: Connection reset by peer]
Sigyn has joined #ruby
j416 has quit [Ping timeout: 245 seconds]
jane_booty_doe has quit [Remote host closed the connection]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
j416 has joined #ruby
jinie has joined #ruby
desperek has joined #ruby
j416 has quit [Ping timeout: 245 seconds]
j416 has joined #ruby
<apeiros> dionysus69: converting floats to bigdecimals isn't really a good idea.
<apeiros> and I think I told you that before already too
nowhere_man has quit [Ping timeout: 246 seconds]
Cork has quit [Ping timeout: 255 seconds]
siaw23 has joined #ruby
<siaw23> hi, has Ruby got some inbuilt libary that can tell free space left on disk/cpu usage/ram usage?
<siaw23> if not, what’s the be external library for such things?
<siaw23> best*
cek has joined #ruby
sticaz has quit [Ping timeout: 246 seconds]
j416 has quit [Ping timeout: 245 seconds]
sticaz has joined #ruby
<cek> am I expecting too much from #unpack to support "(CSLQ)*" , that is, a repeated group?
aufi has quit [Ping timeout: 272 seconds]
<zenspider> short answer: yes
<zenspider> nowhere in the doco does it say anything about "()" in the syntax
j416 has joined #ruby
<cek> i have no time to parse unpack code
<cek> looks like it's time to unpack libffi riffle
<zenspider> looks like you just need to apply the looping yourself. *shrug*
Cork has joined #ruby
clorisu has quit [Read error: Connection reset by peer]
<dionysus69> apeiros: it is already saved as a decimal, it's just insurance, I am pulling it from cache
<apeiros> dionysus69: what's the point of having an insurance if the insurance is broken?
<dionysus69> and I am not dealing with floats in any way, I do all operations in bigdecimals
<apeiros> that statement is false
<dionysus69> why is it broken? unless redis makes a storage error
RougeR has quit [Ping timeout: 250 seconds]
<apeiros> why do you have it there at all?
<apeiros> and would you put in a random number there too?
<dionysus69> because I send this info to all users very often, db would burn
<dionysus69> actioncable here
<dionysus69> no it's not random number, it's a correctly calculated number 100% :D
<apeiros> read carefully
<apeiros> I did not say it was a random number. I asked whether you'd also put in a random number there instead of the float.
despai has joined #ruby
<dionysus69> no, I only store floats > bigdecimals
<dionysus69> it's basically average of like 4 big decimals, I feel like I can be 100% sure that this operation will always produce big decimals
siaw23 has left #ruby [#ruby]
clorisu has joined #ruby
<apeiros> *sob*, it's pointless
imstar has quit [Quit: Connection closed for inactivity]
dextrey has joined #ruby
clorisu has quit [Quit: Leaving]
sticaz has quit [Quit: BELLA LI!]
bijan_ has quit [Remote host closed the connection]
sticaz has joined #ruby
bijan_ has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
gnufied has joined #ruby
j416 has quit [Ping timeout: 240 seconds]
dbz has joined #ruby
j416 has joined #ruby
dbz has quit [Ping timeout: 252 seconds]
Puffball has quit [Read error: Connection reset by peer]
j416 has quit [Ping timeout: 246 seconds]
Puffball has joined #ruby
Demos[m] has quit [Write error: Connection reset by peer]
turt2live has quit [Remote host closed the connection]
dogweather has joined #ruby
c0ncealed2 has quit [Remote host closed the connection]
zapata_ has joined #ruby
dogweather has quit [Ping timeout: 240 seconds]
zapata has quit [Ping timeout: 252 seconds]
zapata_ has quit [Client Quit]
j416 has joined #ruby
c0ncealed2 has joined #ruby
drale2k_ has joined #ruby
aufi has joined #ruby
zapata has joined #ruby
j416 has quit [Ping timeout: 240 seconds]
thy0 has joined #ruby
akem has quit [Remote host closed the connection]
Azure has quit [Ping timeout: 240 seconds]
nowhere_man has joined #ruby
Azure has joined #ruby
dogweather has joined #ruby
dogweather has quit [Ping timeout: 240 seconds]
dogweather has joined #ruby
dbz has joined #ruby
Rootsudo has quit [Quit: Textual IRC Client: www.textualapp.com]
dogweather has quit [Read error: Connection reset by peer]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
dogweather has joined #ruby
jinie has joined #ruby
dbz has quit [Ping timeout: 245 seconds]
dogweather has quit [Remote host closed the connection]
dogweather has joined #ruby
dogweather has quit [Remote host closed the connection]
dogweather has joined #ruby
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drale2k_ has joined #ruby
AJA4350 has joined #ruby
drale2k_ has quit [Client Quit]
lemonandroid has joined #ruby
dogweather has quit [Read error: Connection reset by peer]
dogweather has joined #ruby
gnufied has quit [Ping timeout: 252 seconds]
sticaz has quit [Ping timeout: 245 seconds]
<dionysus69> apeiros: it's not that bad :)
bijan_ has quit [Remote host closed the connection]
jcalla has joined #ruby
dogweather has quit [Remote host closed the connection]
dogweather has joined #ruby
akem has joined #ruby
dbz has joined #ruby
dextrey has quit [Ping timeout: 260 seconds]
dbz has quit [Ping timeout: 246 seconds]
dogweather has quit [Ping timeout: 244 seconds]
AJA4350 has quit [Remote host closed the connection]
Puffball has quit [Read error: Connection reset by peer]
AJA4350 has joined #ruby
dogweather has joined #ruby
Puffball has joined #ruby
tristanp has joined #ruby
bijan_ has joined #ruby
tristanp has quit [Ping timeout: 240 seconds]
dbugger_ is now known as Dbugger
fmcgeough has joined #ruby
dogweather has quit [Remote host closed the connection]
dogweather has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
jottr has joined #ruby
despai has quit [Quit: ...]
za1b1tsu_ has quit [Quit: WeeChat 2.1]
bijan_ has joined #ruby
gnufied has joined #ruby
akem has quit [Remote host closed the connection]
akem has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
akem has quit [Remote host closed the connection]
dogweather has quit [Remote host closed the connection]
dogweather has joined #ruby
akem has joined #ruby
snickers has quit [Ping timeout: 260 seconds]
dogweather has quit [Read error: Connection reset by peer]
dogweather has joined #ruby
dogweather has quit [Remote host closed the connection]
akem has quit [Remote host closed the connection]
dogweather has joined #ruby
aupadhye has quit [Ping timeout: 246 seconds]
Inline has joined #ruby
akem has joined #ruby
dogweather has quit [Remote host closed the connection]
sticaz has joined #ruby
dogweather has joined #ruby
bastilian has joined #ruby
turt2live has joined #ruby
Demos[m] has joined #ruby
akem has quit [Remote host closed the connection]
bijan_ has quit [Remote host closed the connection]
bauruine has quit [Quit: ZNC - http://znc.in]
thejs has joined #ruby
akem has joined #ruby
qolq has joined #ruby
despai has joined #ruby
bmurt has joined #ruby
aupadhye has joined #ruby
bauruine has joined #ruby
dogweather has quit [Read error: Connection reset by peer]
dogweather has joined #ruby
synstack has joined #ruby
RougeR has joined #ruby
dogweather has quit [Remote host closed the connection]
dogweather has joined #ruby
cek has quit [Quit: Connection closed for inactivity]
synstack has quit [Client Quit]
dogweather has quit [Read error: Connection reset by peer]
bijan_ has joined #ruby
dogweather has joined #ruby
akem has quit [Quit: Leaving]
dogweather has quit [Read error: Connection reset by peer]
bijan_ has quit [Ping timeout: 252 seconds]
dogweather has joined #ruby
aesthetikx has joined #ruby
dogweather has quit [Read error: Connection reset by peer]
Rapture has joined #ruby
bijan_ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
akem has joined #ruby
akem has quit [Client Quit]
alex`` has quit [Ping timeout: 240 seconds]
dostoyevsky has joined #ruby
alex`` has joined #ruby
<dostoyevsky> Hi. Does jupyter have support to plot graphs etc via Ruby? I installed the Ruby kernel for jupyter, so I can use Ruby, but I am not sure how much more support there actually is
bijan_ has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
kapil___ has joined #ruby
<balo> dostoyevsky: i havent't tried any of them https://github.com/arbox/data-science-with-ruby#visualization
Nicmavr has joined #ruby
k0mpa has quit [Ping timeout: 250 seconds]
<dostoyevsky> balo: Thanks!
bijan_ has quit [Ping timeout: 252 seconds]
akaiiro has joined #ruby
<RougeR> heya
<RougeR> anyone able to help me with stubbing in mocha/minitest
bijan_ has joined #ruby
<RougeR> this is basically metacode on line 17
<RougeR> but i want to do something like that
<RougeR> line 17 of spec*
bijan_ has quit [Ping timeout: 252 seconds]
alex`` has quit [Quit: WeeChat 2.2]
bmurt has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
bijan_ has joined #ruby
joast has quit [Quit: Leaving.]
bijan_ has quit [Ping timeout: 252 seconds]
joast has joined #ruby
cgfbee has quit [Ping timeout: 260 seconds]
[Butch] has joined #ruby
<RougeR> anyone?
bijan_ has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]
eddof13 has joined #ruby
dogweather has joined #ruby
dogweather has quit [Ping timeout: 240 seconds]
bijan_ has joined #ruby
dogweather has joined #ruby
chouhoulis has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
dumptruckman has quit [Ping timeout: 264 seconds]
dumptruckman has joined #ruby
bijan_ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
despai has quit [Quit: ...]
RougeR has quit [Quit: Leaving]
j416 has joined #ruby
Tempesta has quit [Read error: Connection reset by peer]
Tempesta has joined #ruby
polishdub has joined #ruby
aupadhye has quit [Remote host closed the connection]
bijan_ has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
lomex has joined #ruby
DTZUZO has quit [Ping timeout: 240 seconds]
bijan_ has quit [Ping timeout: 252 seconds]
bmurt has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
troys has joined #ruby
bijan_ has joined #ruby
mroutis has joined #ruby
dogweather has quit [Remote host closed the connection]
bijan_ has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
alex`` has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
aufi has quit [Remote host closed the connection]
DTZUZO has joined #ruby
MoritaShinobu has joined #ruby
bijan_ has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.2]
MoritaShinobu has quit [Client Quit]
gr33n7007h has joined #ruby
MoritaShinobu has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
jcarl43 has joined #ruby
MoritaShinobu has quit [Client Quit]
MoritaShinobu has joined #ruby
gr33n7007h is now known as al2o3-cr
dionysus69 has quit [Ping timeout: 246 seconds]
MoritaShinobu has quit [Client Quit]
lemonandroid has quit [Ping timeout: 252 seconds]
MoritaShinobu has joined #ruby
bijan_ has joined #ruby
alex`` has quit [Quit: WeeChat 2.2]
alex`` has joined #ruby
eckhardt_ has joined #ruby
dogweather has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
Nicmavr has quit [Quit: ZNC 1.7.0 - https://znc.in]
dogweather has quit [Ping timeout: 246 seconds]
bijan_ has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]
kapil___ has quit [Quit: Connection closed for inactivity]
orbyt_ has joined #ruby
TomyWork has quit [Remote host closed the connection]
jane_booty_doe has joined #ruby
sysvalve has quit [Quit: Leaving]
Beams has quit [Quit: .]
bijan_ has joined #ruby
bijan_ has quit [Client Quit]
Nicmavr has joined #ruby
bmurt has quit [Read error: Connection reset by peer]
alex`` has quit [Quit: WeeChat 2.2]
bmurt has joined #ruby
c0ncealed2 has quit [Read error: Connection reset by peer]
doubledup has joined #ruby
c0ncealed2 has joined #ruby
yohji has quit [Remote host closed the connection]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
ShekharReddy has joined #ruby
reber has left #ruby ["Leaving"]
dbz has joined #ruby
dbz_ has joined #ruby
ShekharReddy has quit []
dbz has quit [Ping timeout: 240 seconds]
ShekharReddy has joined #ruby
fluxAeon has quit [Ping timeout: 246 seconds]
bmurt has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
fluxAeon has joined #ruby
sticaz has quit [Quit: BELLA LI!]
kapil___ has joined #ruby
lxsameer has quit [Ping timeout: 245 seconds]
DTZUZO has quit [Ping timeout: 245 seconds]
sticaz has joined #ruby
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
lxsameer has joined #ruby
dextrey has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 240 seconds]
jane_booty_doe has quit [Quit: Leaving]
lxsameer has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
bmurt has joined #ruby
lxsameer has quit [Ping timeout: 245 seconds]
thejs has quit [Ping timeout: 240 seconds]
eckhardt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
lxsameer has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
Rapture has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
jcarl43 has quit [Ping timeout: 244 seconds]
lxsameer has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 245 seconds]
lxsameer has joined #ruby
marz_d`ghostman has joined #ruby
<marz_d`ghostman> How do I get the right size of a directory? File.stat(dir).size seems to return an incorrect one.
<apeiros> marz_d`ghostman: you'll have to sum the sizes of all files in the directory
<havenwood> marz_d`ghostman: You want just the files in the directory itself or also files in subdirectories?
despai has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
nowhere_man has joined #ruby
<havenwood> marz_d`ghostman: Dir.each_child('.').sum &File.method(:size)
<apeiros> I think that won't work for anything but the cwd
<apeiros> at least iirc each_child yields only the filename, not the path, no?
* apeiros should probably test that, but feels too lazy rn 0:-)
<havenwood> apeiros: good point, it's not full paths
<apeiros> Dir.glob would be relative, so should work. but needs a flag for dot-files
lxsameer has joined #ruby
<havenwood> Pathname(dir).each_child.sum &File.method(:size)
<havenwood> apeiros: Or the Pathname variant of #children and #each_child takes an argument that defaults to full path.
<apeiros> 👍🏻
jane_booty_doe has joined #ruby
lxsameer has quit [Ping timeout: 252 seconds]
<marz_d`ghostman> havenwood: apeiros thanks
mroutis has quit [Ping timeout: 252 seconds]
<havenwood> marz_d`ghostman: no prob. you don't need it recursive into directories then?
<marz_d`ghostman> havenwood: oh, also the subdirectories, I want the size of everything in the given directory
fmcgeough has joined #ruby
<havenwood> marz_d`ghostman: require 'find'; Find.find('.').sum { |path| File.file?(path) ? File.size(path) : 0 }
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<marz_d`ghostman> havenwood: just what I've searched, find module, hehe, but in ruby 2.4 https://ruby-doc.org/stdlib-2.4.0/libdoc/find/rdoc/Find.html
lxsameer has joined #ruby
despai has quit [Read error: Connection reset by peer]
despai has joined #ruby
<havenwood> marz_d`ghostman: Or if you want to include directory size: Find.find(dir).sum &File.method(:size)
<marz_d`ghostman> havenwood: isn't the directory size derived from all the files inside it?
<havenwood> marz_d`ghostman: For example, check: File.size('.')
<havenwood> marz_d`ghostman: nope
akaiiro has quit [Ping timeout: 240 seconds]
<marz_d`ghostman> havenwood: so a directory can have a different size of itself?
lxsameer has quit [Ping timeout: 240 seconds]
<havenwood> marz_d`ghostman: Directories are files too.
<havenwood> marz_d`ghostman: They have a file size that's a totally different thing than the cumulative size of the files in the directory.
<havenwood> marz_d`ghostman: So it depends on what you're trying to count.
<havenwood> Whether you'll want to include the file size of the directories.
<marz_d`ghostman> havenwood: ah I get it now, everything is a file in unix
<havenwood> \o/
lxsameer has joined #ruby
lxsameer has quit [Ping timeout: 245 seconds]
solocshaw has joined #ruby
lxsameer has joined #ruby
solocshaw has quit [Client Quit]
lemonandroid has joined #ruby
thejs has joined #ruby
lxsameer has quit [Ping timeout: 252 seconds]
lxsameer has joined #ruby
snickers has joined #ruby
lxsameer has quit [Ping timeout: 246 seconds]
MoritaShinobu has quit [Ping timeout: 245 seconds]
<kapil___> i have `args: { qinput: [{ EntityClassIdVal1 : C.EntityClass.CustomerId}]}` in yaml file. but `C.EntityClass.CustomerId` is not a string
<kapil___> how to not parse it as string
<havenwood> kapil___: What is it supposed to be? Where'd that YAML come from?
lxsameer has joined #ruby
<kapil___> havenwood: its my own yaml file
<kapil___> i did `args = obj.dig('args')`
<marz_d`ghostman> havenwood: tried issuing a command on my temrinal `du -s -B1` there seems to be a difference, it says 61440, but in the browser it only has 55943
<kapil___> `pretty_json(args).gsub(": \"", ": ").gsub("\"}]}", "")`
lxsameer has quit [Ping timeout: 240 seconds]
<lemonandroid> kapil___you don't want it to be a string but it is currently a string?
<havenwood> marz_d`ghostman: When compared to?: Find.find('.').sum { |path| File.file?(path) ? File.size(path) : 0 }
<kapil___> lemonandroid: yes
<marz_d`ghostman> havenwood: Find.find(dir).sum &File.method(:size)
<lemonandroid> kapil___What do you want it to be?
<kapil___> its a string but without quotes
bmurt has joined #ruby
<lemonandroid> kapil___i don't understand
<kapil___> I am writing a generator, so i want to print it as without quotes
<havenwood> marz_d`ghostman: du doesn't count the filesize of directories themselves
<lemonandroid> kapil___to a file?
<marz_d`ghostman> havenwood: but it shows a greater size
<kapil___> lemonandroid: yes its javascript file
<havenwood> marz_d`ghostman: Maybe because?: "The du utility counts the storage used by symbolic links and not the files they reference"
snickers has quit [Ping timeout: 252 seconds]
<lemonandroid> kapil___thanks, I understand now, let me think for a while
<kapil___> ok np
<marz_d`ghostman> havenwood: that would mean the symbolic links has greater size than those files they reference. Plausible
lxsameer has joined #ruby
rupam123456 has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dogweather has joined #ruby
MoritaShinobu has joined #ruby
<havenwood> marz_d`ghostman: how about du with -L flag too?
lenqbit has joined #ruby
<havenwood> -L, --dereference dereference all symbolic links
<havenwood> marz_d`ghostman: or --apparent-size
<marz_d`ghostman> havenwood: still the same size as before, 61440
<havenwood> marz_d`ghostman: how about --apparent-size?
<marz_d`ghostman> havenwood: that did it
<marz_d`ghostman> --apparent-size print apparent sizes, rather than disk usage; although the apparent size is usually smaller, it may be larger due to holes in ('sparse') files, internal fragmentation, indirect blocks, and the like
<havenwood> "holes in (`sparse') files, internal fragmentation, indirect blocks, and the like"
<havenwood> indeed
<marz_d`ghostman> havenwood: don't really understand that one haha
lxsameer has quit [Ping timeout: 245 seconds]
<havenwood> marz_d`ghostman: do you have an encrypted filesystem?
<marz_d`ghostman> havenwood: nope, just plan ext4
<lemonandroid> kapil___Is the yaml snippet you posted earlier part of a bigger yaml file?
cek has joined #ruby
akem has joined #ruby
<havenwood> marz_d`ghostman: https://en.wikipedia.org/wiki/Sparse_file
<marz_d`ghostman> havenwood: I'll give that a read, thanks for the help. I appreciate it. :)
<havenwood> marz_d`ghostman: you're welcome
<kapil___> lemonandroid: yes, its
MoritaShinobu has quit [Quit: Leaving]
Cthulu201 has quit [Quit: Nowhere special. I always wanted to go there.]
lxsameer has joined #ruby
Cthulu201 has joined #ruby
<lemonandroid> kapil___ how about `YAML.dump(args)`?
jcarl43 has joined #ruby
<kapil___> lemonandroid: somewhere in the code i have `@yamlConfig = YAML.load_file(File.expand_path('config.yaml', __dir__))`
<lemonandroid> @kapi
<lemonandroid> kapil___I mean `YAML.dump` instead of `pretty_json`
<kapil___> wait i try it
lxsameer has quit [Ping timeout: 246 seconds]
<kapil___> lemonandroid: thanks, it worked. but what it does,
<kapil___> lemonandroid: no its not work
<kapil___> it print empty {} as value
dbz_ has quit [Remote host closed the connection]
knight33 has joined #ruby
<kapil___> it outputs `"--- {}\n"`
<lemonandroid> what's the associated code snippet?
<lemonandroid> `YAML.dump(args)`? if so, what's the value of args
dextrey has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
dbz has joined #ruby
<kapil___> `puts args` results `{"qinput"=>[{"EntityClassIdVal1"=>"C.EntityClass.CustomerId"}]}`
<lemonandroid> please do args.inspect
<lemonandroid> please do `puts args.inspect`
<kapil___> `YAML.dump(args)` results `"---\nqinput:\n- EntityClassIdVal1: C.EntityClass.CustomerId\n"`
<kapil___> `puts args.inspect
<kapil___> {"qinput"=>[{"EntityClassIdVal1"=>"C.EntityClass.CustomerId"}]}`
dellavg_ has quit [Ping timeout: 246 seconds]
<lemonandroid> kapil___ok, sure, yaml wont work
<kapil___> lemonandroid: dump work for what other file types?
<lemonandroid> kapil___i was probalby hoping that it is magically working, i think yaml also supports the syntax that you need
lxsameer has quit [Ping timeout: 252 seconds]
<kapil___> thanks will check it later
marz_d`ghostman has quit [Quit: Page closed]
<lemonandroid> kapil___have a look at this, not exactly what you want probably but will give you a head start: https://gist.github.com/lyoshenka/4680297
lxsameer has joined #ruby
dogweather has quit [Remote host closed the connection]
fmcgeough has quit [Quit: fmcgeough]
lxsameer has quit [Ping timeout: 240 seconds]
dogweather has joined #ruby
eckhardt_ has joined #ruby
lxsameer has joined #ruby
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Zaab1t has joined #ruby
graft has joined #ruby
<graft> hey all, my sysadmin wants to know if there are built-in tests to validate a ruby installation after building from source
<graft> i'm not familiar with any such, does something like this exist?
<cek> yeah. run rails tests
dogweather has quit [Ping timeout: 246 seconds]
<graft> rails is not ruby
lxsameer has quit [Ping timeout: 240 seconds]
<cek> long time ago, some ruby implementations couldn't pass them
<apeiros> graft: `make test`
<apeiros> iirc
<cek> and ruby is not rails?
<apeiros> no, ruby is not rails cek
JamJam_kid has joined #ruby
<graft> apeiros: make test, makes sense
<graft> now i just need to figure out how ruby-build does such a thing
<graft> might do it automatically
<apeiros> `make sense`, I wish that command existed for irc ;-D
knight33 has joined #ruby
dogweather has joined #ruby
<lemonandroid> `be humble` would also be cool
lxsameer has joined #ruby
dogweather has quit [Ping timeout: 246 seconds]
lxsameer has quit [Ping timeout: 246 seconds]
doubledup has quit [Quit: Leaving]
lenqbit has quit [Ping timeout: 252 seconds]
graft has quit [Ping timeout: 245 seconds]
orbyt_ has joined #ruby
eckhardt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
thejs has quit [Ping timeout: 246 seconds]
<bathtub_shark> apeiros: it's not called "make" on irc, it's called "/kick" ;)
<apeiros> ah, but kick is overpowered for people who can't manage to make sense :)
KeyJoo has joined #ruby
<bathtub_shark> that depends on how persistent they are in not making sense
eckhardt_ has joined #ruby
sticaz has quit [Quit: BELLA LI!]
ramfjord has joined #ruby
<JJonah> is it possible (somehow) to get a ruby thread to start before the method which kicks it off exits? ie, i am trying to avoid the hanging, without output, I get here: https://eval.in/1052858
JamJam_kid has quit [Remote host closed the connection]
<ramfjord> JJonah: is that not printing hi for you? If you call #join (as you're doing), it will not only start but finish the thread before #join returns.
<JJonah> ramfjord: it will print, but only after the sleep finishes. i want the thread to start when it actually starts, and i was assuming the sleep affects only the main thread...
<ramfjord> JJonah: that could just be because stdout is buffered, not necessarily because the thread hasn't executed
<ramfjord> try `STDOUT.sync = true`
<JJonah> ramfjord: ah! you're right. if i raise an exception it goes immediately. ty
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lomex has joined #ruby
thejs has joined #ruby
kspencer has joined #ruby
lomex has quit [Ping timeout: 260 seconds]
<havenwood> JJonah: You can also: puts "hi\n"
<JJonah> havenwood: ty, good to know
<havenwood> JJonah: An explicit newline prints in the same operation as the line.
dbz_ has joined #ruby
dbz__ has joined #ruby
polishdub has quit [Quit: leaving]
dbz has quit [Ping timeout: 252 seconds]
dbz_ has quit [Ping timeout: 252 seconds]
ivanskie has joined #ruby
Puffball has quit [Remote host closed the connection]
<apeiros> bathtub_shark: yeah, there's some truth to that :D
LiftLeft has quit [Remote host closed the connection]
dbz__ has quit [Remote host closed the connection]
tdy has joined #ruby
dbz has joined #ruby
LiftLeft has joined #ruby
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
LiftLeft2 has joined #ruby
LiftLeft has quit [Ping timeout: 240 seconds]
LiftLeft2 is now known as LiftLeft
dbz has quit [Remote host closed the connection]
<lemonandroid> kapil___did the gist help?
ramfjord has quit [Ping timeout: 272 seconds]
MiLLiYEtCHi has joined #ruby
clorisu has joined #ruby
eckhardt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
dextrey has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
Dbugger has quit [Ping timeout: 240 seconds]
Zaab1t has quit [Quit: Zaab1t]
akaiiro has joined #ruby
rkoller has joined #ruby
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
kapil___ has quit [Quit: Connection closed for inactivity]
<cthulchu> what does this mean? end.parse!
<baweaver> cthulchu: OptParser probably
<baweaver> Read its docs
<baweaver> Has a bang because it mutates ARGV, which is why I tend to prefer ljarvis's Slop instead.
<cthulchu> riiight
<baweaver> Bang = !
Creatornator has joined #ruby
dbz has joined #ruby
tdy has quit [Ping timeout: 246 seconds]
eckhardt_ has joined #ruby
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
druonysus has joined #ruby
cinnamntig3r has joined #ruby
apeiros has quit [Remote host closed the connection]
mroutis has joined #ruby
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
paraxial has quit [Quit: The Lounge - https://thelounge.github.io]
paraxial has joined #ruby
chouhoulis has quit [Ping timeout: 252 seconds]
cek has quit [Quit: Connection closed for inactivity]
lxsameer has joined #ruby
orbyt_ has joined #ruby
lxsameer has quit [Ping timeout: 252 seconds]
DTZUZO has joined #ruby
<nofxx> cthulchu, something { bla }.and(foo) == something do bla end.and(foo)
<baweaver> (though the second is super super ugly and makes baweaver cry)
<nofxx> baweaver, it makes me want to buy an AR-15 or maybe steal a tank... well, same trigger, different reactions
<baweaver> Maybe a bit much for the channel.
<baweaver> Also not a fan of implied violence or jokes thereto
<cthulchu> nofxx, I didn't know we could do that... I don't know how it workd
<cthulchu> is and a method of the something?
<baweaver> Blocks can be delimited with `do ... end` or `{ ... }`
<cthulchu> that I kno
<cthulchu> w
<cthulchu> how can we do . to blocks
<nofxx> cthulchu, a method of the block's response
<cthulchu> and how it works
<cthulchu> aha
KeyJoo has quit [Ping timeout: 246 seconds]
<nofxx> baweaver, bah, no 'buts and ifs' on jokes
<cthulchu> you mean return
<cthulchu> a method of the block's return
<cthulchu> now will that thing fire on every method call?
troulouliou_dev has joined #ruby
troulouliou_dev has quit [Remote host closed the connection]
apeiros has joined #ruby
troulouliou_dev has joined #ruby
joast has quit [Quit: Leaving.]
joast has joined #ruby
apeiros has quit [Ping timeout: 252 seconds]
dextrey has quit [Ping timeout: 252 seconds]
troulouliou_dev has quit [Quit: Leaving]
akaiiro has quit [Ping timeout: 244 seconds]
teej has quit [Quit: Connection closed for inactivity]
Creatornator has quit [Quit: Textual IRC Client: www.textualapp.com]
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
dbz has quit [Remote host closed the connection]
troulouliou_dev has joined #ruby
apeiros has joined #ruby
troulouliou_dev has quit [Client Quit]
dbz has joined #ruby
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
apeiros has quit [Ping timeout: 246 seconds]
canton7 has quit [Quit: ZNC - http://znc.in]
canton7 has joined #ruby
<clorisu> whats the difference between hash and hsh?
<baweaver> One is missing an a
<baweaver> What code did you see it in?
Nuru has joined #ruby
rkoller has quit [Quit: Textual IRC Client: www.textualapp.com]
nowhere_man has quit [Ping timeout: 245 seconds]
apeiros has joined #ruby
<clorisu> baweaver: in the ruby docs
apeiros has quit [Ping timeout: 252 seconds]
jane_booty_doe has quit [Quit: Leaving]
dbz has quit [Ping timeout: 244 seconds]
mroutis has quit [Remote host closed the connection]
desperek has quit [Quit: xoxo]
apeiros has joined #ruby
arescorpio has joined #ruby
apeiros has quit [Ping timeout: 272 seconds]
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
thejs has quit [Remote host closed the connection]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
agent_white has quit [Ping timeout: 246 seconds]