00:01
despai has quit [Ping timeout: 240 seconds]
00:01
akem has quit [Client Quit]
00:07
alex`` has quit [Quit: WeeChat 2.2]
00:10
akem has joined #ruby
00:13
desperek has quit [Quit: xoxo]
00:20
Azure|dc has joined #ruby
00:20
Azure|dc has quit [Read error: Connection reset by peer]
00:20
Azure has quit [Ping timeout: 250 seconds]
00:21
Azure has joined #ruby
00:21
thejs has quit [Remote host closed the connection]
00:29
arescorpio has joined #ruby
00:30
Azure has quit [Ping timeout: 252 seconds]
00:30
Azure|dc has joined #ruby
00:34
jcarl43 has quit [Quit: WeeChat 2.2]
00:36
DTZUZO has quit [Ping timeout: 245 seconds]
00:41
ArahaelPi has quit [Ping timeout: 252 seconds]
00:48
bmurt has joined #ruby
00:52
wildermind has quit [Quit: Connection closed for inactivity]
00:59
akaiiro has joined #ruby
00:59
SeepingN has quit [Quit: The system is going down for reboot NOW!]
01:00
lxsameer has joined #ruby
01:03
apeiros has quit [Ping timeout: 245 seconds]
01:04
lxsameer has quit [Ping timeout: 245 seconds]
01:08
ArahaelPi has joined #ruby
01:13
ur5us has quit [Remote host closed the connection]
01:22
akaiiro has quit [Ping timeout: 240 seconds]
01:28
agent_white has joined #ruby
01:31
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:32
AJA4350 has quit [Remote host closed the connection]
01:34
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:36
tdy has quit [Ping timeout: 240 seconds]
01:40
orbyt_ has joined #ruby
01:44
orbyt_ has quit [Ping timeout: 245 seconds]
01:48
bmurt has quit [Read error: Connection reset by peer]
01:48
dbz has joined #ruby
01:49
<
scrptktty >
Submitted my RubyConf scholarship~~
01:49
bmurt has joined #ruby
01:54
cagomez has joined #ruby
02:01
h0h0h0 has joined #ruby
02:01
thy0 has quit [Quit: TTFN]
02:02
sylario has quit [Quit: Connection closed for inactivity]
02:02
cagomez has quit [Read error: No route to host]
02:03
cagomez has joined #ruby
02:06
tdy has joined #ruby
02:07
esrse has joined #ruby
02:09
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:12
j416 has quit [Read error: Connection reset by peer]
02:14
j416_ has joined #ruby
02:14
tdy has quit [Ping timeout: 252 seconds]
02:16
dbz has quit [Remote host closed the connection]
02:17
j416_ is now known as j416
02:19
bmurt has joined #ruby
02:32
akaiiro has joined #ruby
02:39
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:40
renzhi has joined #ruby
02:49
bmurt has joined #ruby
02:53
bmurt has quit [Client Quit]
02:56
akaiiro has quit [Ping timeout: 240 seconds]
03:00
Rootsudo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
03:01
lxsameer has joined #ruby
03:01
arescorpio has quit [Remote host closed the connection]
03:04
sspreitz has quit [Ping timeout: 252 seconds]
03:05
sspreitz has joined #ruby
03:05
lxsameer has quit [Ping timeout: 252 seconds]
03:06
lemonandroid has joined #ruby
03:06
braincrash has quit [Quit: bye bye]
03:11
akaiiro has joined #ruby
03:11
braincrash has joined #ruby
03:15
akaiiro has quit [Remote host closed the connection]
03:17
dbugger_ has joined #ruby
03:19
gnufied has quit [Ping timeout: 240 seconds]
03:19
Dbugger has quit [Ping timeout: 240 seconds]
03:23
orbyt_ has joined #ruby
03:27
MuffinPimp has quit [Ping timeout: 252 seconds]
03:33
jane_booty_doe has quit [Quit: Leaving]
03:36
kapil___ has joined #ruby
03:37
cagomez has quit [Read error: Connection reset by peer]
03:37
cagomez has joined #ruby
03:39
MuffinPimp has joined #ruby
03:40
cagomez has quit [Read error: No route to host]
03:40
cagomez has joined #ruby
03:48
MuffinPimp has quit [Ping timeout: 252 seconds]
03:49
MuffinPimp has joined #ruby
04:00
DTZUZO has joined #ruby
04:04
dendazen has quit [Ping timeout: 246 seconds]
04:12
cagomez has quit [Remote host closed the connection]
04:12
jane_booty_doe has joined #ruby
04:12
cagomez has joined #ruby
04:12
cagomez has quit [Remote host closed the connection]
04:13
cagomez has joined #ruby
04:13
cagomez has quit [Remote host closed the connection]
04:23
cagomez has joined #ruby
04:24
dviola has quit [Quit: WeeChat 2.2]
04:28
cagomez has quit [Ping timeout: 240 seconds]
04:31
cgfbee has quit [Ping timeout: 268 seconds]
04:38
cgfbee has joined #ruby
04:48
dogweather has joined #ruby
04:50
jjman has joined #ruby
05:01
dogweather has quit [Ping timeout: 245 seconds]
05:01
jp has quit [Ping timeout: 246 seconds]
05:05
dogweather has joined #ruby
05:11
scrptktty has quit [Quit: Connection closed for inactivity]
05:13
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:14
troys has quit [Quit: Bye]
05:15
jp has joined #ruby
05:19
dogweather has quit [Ping timeout: 250 seconds]
05:23
dogweather has joined #ruby
05:36
dogweather has quit [Ping timeout: 240 seconds]
05:40
dogweather has joined #ruby
05:45
dionysus69 has joined #ruby
05:51
Inline has quit [Quit: Leaving]
05:52
code_zombie has joined #ruby
05:53
dogweather has quit [Ping timeout: 252 seconds]
05:57
bak1an has joined #ruby
06:00
orbyt_ has joined #ruby
06:03
reber has joined #ruby
06:05
apeiros has joined #ruby
06:09
kevinsjoberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:11
code_zombie has quit [Quit: Leaving]
06:13
snickers has joined #ruby
06:15
Emmanuel_Chanel has joined #ruby
06:21
aupadhye has joined #ruby
06:25
Rootsudo has joined #ruby
06:28
jamesaxl has quit [Ping timeout: 240 seconds]
06:36
akem has quit [Remote host closed the connection]
06:37
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:38
kevinsjoberg has joined #ruby
06:42
Azure|dc has quit [Read error: Connection reset by peer]
06:42
kevinsjoberg has quit [Ping timeout: 250 seconds]
06:43
Azure has joined #ruby
06:48
dbz has joined #ruby
06:54
aufi has joined #ruby
06:59
dellavg_ has joined #ruby
07:07
marz_d`ghostman has joined #ruby
07:08
alex`` has joined #ruby
07:08
<
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?
07:10
yohji has joined #ruby
07:10
druonysus has quit [Quit: No Ping reply in 180 seconds.]
07:11
<
baweaver >
I mean you
_could_ if you really wanted to with CGI extensions
07:11
<
baweaver >
Though it really depends what you want to do.
07:12
<
baweaver >
Also CGI extensions can be notoriously insecure and error prone, while being hard to debug
07:15
<
baweaver >
How much do you know about programming, and why Ruby?
07:15
<
baweaver >
also, what are you intending to build?
07:16
<
marz_d`ghostman >
baweaver: not a lot when it comes to these kind of stuff. Just a webpage serving directories/files
07:16
<
marz_d`ghostman >
baweaver: cause I've been using ruby on my other scripts :)
07:17
<
baweaver >
Then why not just run Apache in a directory?
07:17
<
baweaver >
That gives you pretty much that
07:17
sysvalve has joined #ruby
07:18
<
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.
07:19
<
apeiros >
and as baweaver mentioned, you can always use cgi/fcgi
07:21
<
zenspider >
*cough* webrick
*cough*
07:21
<
apeiros >
"via apache"?
07:21
<
baweaver >
ohai zenspider
07:21
<
apeiros >
I mean, ok, you can configure apache as a reverse-proxy :D
07:22
<
zenspider >
then you have two problems
07:24
<
marz_d`ghostman >
hmmm, maybe I'll give nodejs a try then
07:24
<
apeiros >
I'd be happy if I could trade what I have for as little as two problems 😂
07:25
<
apeiros >
marz_d`ghostman: weird reasoning, but sure, whatever fits your bill. the situation there won't differ much, though.
07:26
<
marz_d`ghostman >
apeiros: Will it be simple to just use sinatra?
07:26
<
zenspider >
node? now you have ALL the problems :P
07:26
<
apeiros >
define "simple". but yes, using sinatra is IMO rather simple.
07:28
<
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 :)
07:29
ellcs has joined #ruby
07:31
* baweaver
still thinks you don't need anything more than Apache directory listings
07:33
cgfbee has quit [Ping timeout: 252 seconds]
07:34
ellcs has quit [Ping timeout: 240 seconds]
07:38
za1b1tsu_ has joined #ruby
07:39
jp has quit [Ping timeout: 260 seconds]
07:43
marz_d`ghostman has quit [Quit: Page closed]
07:45
akem has joined #ruby
07:48
tristanp has joined #ruby
07:50
cgfbee has joined #ruby
07:54
tristanp has quit [Ping timeout: 260 seconds]
07:55
jp has joined #ruby
07:57
lemonandroid has quit [Read error: Connection reset by peer]
07:58
clorisu has joined #ruby
07:59
esrse has quit [Ping timeout: 245 seconds]
08:00
dbz has quit [Remote host closed the connection]
08:01
lxsameer has joined #ruby
08:06
RougeR has joined #ruby
08:32
bathtub_shark has joined #ruby
08:34
Beams has joined #ruby
08:40
bijan_ has joined #ruby
08:41
bijan_ has quit [Client Quit]
08:41
bijan_ has joined #ruby
08:46
qolq has quit [Quit: qolq]
08:59
TomyWork has joined #ruby
08:59
sylario has joined #ruby
09:06
nowhere_man has joined #ruby
09:06
GodFather has quit [Ping timeout: 250 seconds]
09:07
<
dionysus69 >
>> price / (true ? {:price=>0.2791e3}[:price].to_d : 1)
09:07
<
ruby[bot] >
dionysus69: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
09:07
Sigyn has quit [Read error: Connection reset by peer]
09:08
Sigyn has joined #ruby
09:08
j416 has quit [Ping timeout: 245 seconds]
09:12
jane_booty_doe has quit [Remote host closed the connection]
09:13
j416 has joined #ruby
09:15
jinie has joined #ruby
09:17
desperek has joined #ruby
09:20
j416 has quit [Ping timeout: 245 seconds]
09:21
j416 has joined #ruby
09:21
<
apeiros >
dionysus69: converting floats to bigdecimals isn't really a good idea.
09:21
<
apeiros >
and I think I told you that before already too
09:25
nowhere_man has quit [Ping timeout: 246 seconds]
09:28
Cork has quit [Ping timeout: 255 seconds]
09:28
siaw23 has joined #ruby
09:29
<
siaw23 >
hi, has Ruby got some inbuilt libary that can tell free space left on disk/cpu usage/ram usage?
09:29
<
siaw23 >
if not, what’s the be external library for such things?
09:30
cek has joined #ruby
09:31
sticaz has quit [Ping timeout: 246 seconds]
09:31
j416 has quit [Ping timeout: 245 seconds]
09:32
sticaz has joined #ruby
09:34
<
cek >
am I expecting too much from #unpack to support "(CSLQ)*" , that is, a repeated group?
09:38
aufi has quit [Ping timeout: 272 seconds]
09:39
<
zenspider >
short answer: yes
09:39
<
zenspider >
nowhere in the doco does it say anything about "()" in the syntax
09:40
j416 has joined #ruby
09:42
<
cek >
i have no time to parse unpack code
09:43
<
cek >
looks like it's time to unpack libffi riffle
09:43
<
zenspider >
looks like you just need to apply the looping yourself.
*shrug*
09:43
Cork has joined #ruby
09:44
clorisu has quit [Read error: Connection reset by peer]
09:49
<
dionysus69 >
apeiros: it is already saved as a decimal, it's just insurance, I am pulling it from cache
09:49
<
apeiros >
dionysus69: what's the point of having an insurance if the insurance is broken?
09:50
<
dionysus69 >
and I am not dealing with floats in any way, I do all operations in bigdecimals
09:50
<
apeiros >
that statement is false
09:50
<
dionysus69 >
why is it broken? unless redis makes a storage error
09:51
RougeR has quit [Ping timeout: 250 seconds]
09:51
<
apeiros >
why do you have it there at all?
09:51
<
apeiros >
and would you put in a random number there too?
09:51
<
dionysus69 >
because I send this info to all users very often, db would burn
09:51
<
dionysus69 >
actioncable here
09:52
<
dionysus69 >
no it's not random number, it's a correctly calculated number 100% :D
09:54
<
apeiros >
read carefully
09:54
<
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.
09:57
despai has joined #ruby
09:58
<
dionysus69 >
no, I only store floats > bigdecimals
09:59
<
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
10:01
siaw23 has left #ruby [#ruby]
10:03
clorisu has joined #ruby
10:05
<
apeiros >
*sob*, it's pointless
10:13
imstar has quit [Quit: Connection closed for inactivity]
10:13
dextrey has joined #ruby
10:15
clorisu has quit [Quit: Leaving]
10:18
sticaz has quit [Quit: BELLA LI!]
10:20
bijan_ has quit [Remote host closed the connection]
10:20
sticaz has joined #ruby
10:25
bijan_ has joined #ruby
10:25
kapil___ has quit [Quit: Connection closed for inactivity]
10:29
gnufied has joined #ruby
10:36
j416 has quit [Ping timeout: 240 seconds]
10:38
dbz has joined #ruby
10:42
j416 has joined #ruby
10:42
dbz has quit [Ping timeout: 252 seconds]
10:46
Puffball has quit [Read error: Connection reset by peer]
10:48
j416 has quit [Ping timeout: 246 seconds]
10:51
Puffball has joined #ruby
10:52
Demos[m] has quit [Write error: Connection reset by peer]
10:52
turt2live has quit [Remote host closed the connection]
10:56
dogweather has joined #ruby
11:00
c0ncealed2 has quit [Remote host closed the connection]
11:00
zapata_ has joined #ruby
11:01
dogweather has quit [Ping timeout: 240 seconds]
11:01
zapata has quit [Ping timeout: 252 seconds]
11:01
zapata_ has quit [Client Quit]
11:01
j416 has joined #ruby
11:01
c0ncealed2 has joined #ruby
11:02
drale2k_ has joined #ruby
11:03
aufi has joined #ruby
11:06
zapata has joined #ruby
11:08
j416 has quit [Ping timeout: 240 seconds]
11:14
thy0 has joined #ruby
11:18
akem has quit [Remote host closed the connection]
11:21
Azure has quit [Ping timeout: 240 seconds]
11:21
nowhere_man has joined #ruby
11:22
Azure has joined #ruby
11:28
dogweather has joined #ruby
11:32
dogweather has quit [Ping timeout: 240 seconds]
11:39
dogweather has joined #ruby
11:41
dbz has joined #ruby
11:43
dogweather has quit [Read error: Connection reset by peer]
11:44
dogweather has joined #ruby
11:45
jinie has joined #ruby
11:45
dbz has quit [Ping timeout: 245 seconds]
11:47
dogweather has quit [Remote host closed the connection]
11:48
dogweather has joined #ruby
11:56
dogweather has quit [Remote host closed the connection]
11:57
dogweather has joined #ruby
11:57
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
11:58
drale2k_ has joined #ruby
11:59
AJA4350 has joined #ruby
11:59
drale2k_ has quit [Client Quit]
12:00
lemonandroid has joined #ruby
12:01
dogweather has quit [Read error: Connection reset by peer]
12:01
dogweather has joined #ruby
12:04
gnufied has quit [Ping timeout: 252 seconds]
12:06
sticaz has quit [Ping timeout: 245 seconds]
12:06
<
dionysus69 >
apeiros: it's not that bad :)
12:07
bijan_ has quit [Remote host closed the connection]
12:09
jcalla has joined #ruby
12:09
dogweather has quit [Remote host closed the connection]
12:10
dogweather has joined #ruby
12:16
akem has joined #ruby
12:18
dbz has joined #ruby
12:21
dextrey has quit [Ping timeout: 260 seconds]
12:22
dbz has quit [Ping timeout: 246 seconds]
12:23
dogweather has quit [Ping timeout: 244 seconds]
12:26
AJA4350 has quit [Remote host closed the connection]
12:26
Puffball has quit [Read error: Connection reset by peer]
12:27
AJA4350 has joined #ruby
12:27
dogweather has joined #ruby
12:34
Puffball has joined #ruby
12:38
tristanp has joined #ruby
12:38
bijan_ has joined #ruby
12:42
tristanp has quit [Ping timeout: 240 seconds]
12:43
dbugger_ is now known as Dbugger
12:43
fmcgeough has joined #ruby
12:44
dogweather has quit [Remote host closed the connection]
12:44
dogweather has joined #ruby
12:46
bijan_ has quit [Ping timeout: 252 seconds]
12:49
jottr has joined #ruby
12:49
despai has quit [Quit: ...]
12:49
za1b1tsu_ has quit [Quit: WeeChat 2.1]
12:52
bijan_ has joined #ruby
12:53
gnufied has joined #ruby
12:55
akem has quit [Remote host closed the connection]
12:56
akem has joined #ruby
12:56
nowhere_man has quit [Ping timeout: 240 seconds]
13:00
akem has quit [Remote host closed the connection]
13:01
dogweather has quit [Remote host closed the connection]
13:02
dogweather has joined #ruby
13:04
akem has joined #ruby
13:06
snickers has quit [Ping timeout: 260 seconds]
13:07
dogweather has quit [Read error: Connection reset by peer]
13:07
dogweather has joined #ruby
13:12
dogweather has quit [Remote host closed the connection]
13:12
akem has quit [Remote host closed the connection]
13:12
dogweather has joined #ruby
13:13
aupadhye has quit [Ping timeout: 246 seconds]
13:13
Inline has joined #ruby
13:15
akem has joined #ruby
13:16
dogweather has quit [Remote host closed the connection]
13:16
sticaz has joined #ruby
13:17
dogweather has joined #ruby
13:22
bastilian has joined #ruby
13:22
turt2live has joined #ruby
13:22
Demos[m] has joined #ruby
13:22
akem has quit [Remote host closed the connection]
13:23
bijan_ has quit [Remote host closed the connection]
13:23
thejs has joined #ruby
13:24
akem has joined #ruby
13:26
qolq has joined #ruby
13:28
despai has joined #ruby
13:28
bmurt has joined #ruby
13:29
aupadhye has joined #ruby
13:29
bauruine has joined #ruby
13:32
dogweather has quit [Read error: Connection reset by peer]
13:33
dogweather has joined #ruby
13:34
synstack has joined #ruby
13:35
RougeR has joined #ruby
13:36
dogweather has quit [Remote host closed the connection]
13:37
dogweather has joined #ruby
13:37
cek has quit [Quit: Connection closed for inactivity]
13:37
synstack has quit [Client Quit]
13:41
dogweather has quit [Read error: Connection reset by peer]
13:41
bijan_ has joined #ruby
13:41
dogweather has joined #ruby
13:42
akem has quit [Quit: Leaving]
13:45
dogweather has quit [Read error: Connection reset by peer]
13:46
bijan_ has quit [Ping timeout: 252 seconds]
13:46
dogweather has joined #ruby
13:46
aesthetikx has joined #ruby
13:49
dogweather has quit [Read error: Connection reset by peer]
13:52
Rapture has joined #ruby
13:54
bijan_ has joined #ruby
13:59
bijan_ has quit [Ping timeout: 252 seconds]
14:00
akem has joined #ruby
14:03
akem has quit [Client Quit]
14:07
alex`` has quit [Ping timeout: 240 seconds]
14:09
dostoyevsky has joined #ruby
14:10
alex`` has joined #ruby
14:10
<
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
14:11
bijan_ has joined #ruby
14:12
Nicmavr has quit [Read error: Connection reset by peer]
14:13
kapil___ has joined #ruby
14:14
Nicmavr has joined #ruby
14:14
k0mpa has quit [Ping timeout: 250 seconds]
14:15
<
dostoyevsky >
balo: Thanks!
14:16
bijan_ has quit [Ping timeout: 252 seconds]
14:21
akaiiro has joined #ruby
14:22
<
RougeR >
anyone able to help me with stubbing in mocha/minitest
14:22
bijan_ has joined #ruby
14:26
<
RougeR >
this is basically metacode on line 17
14:26
<
RougeR >
but i want to do something like that
14:26
<
RougeR >
line 17 of spec*
14:27
bijan_ has quit [Ping timeout: 252 seconds]
14:27
alex`` has quit [Quit: WeeChat 2.2]
14:28
bmurt has quit [Read error: Connection reset by peer]
14:29
bmurt has joined #ruby
14:34
bijan_ has joined #ruby
14:36
joast has quit [Quit: Leaving.]
14:38
bijan_ has quit [Ping timeout: 252 seconds]
14:41
joast has joined #ruby
14:43
cgfbee has quit [Ping timeout: 260 seconds]
14:44
[Butch] has joined #ruby
14:45
bijan_ has joined #ruby
14:47
bijan_ has quit [Read error: Connection reset by peer]
14:51
eddof13 has joined #ruby
14:52
dogweather has joined #ruby
14:56
dogweather has quit [Ping timeout: 240 seconds]
14:59
bijan_ has joined #ruby
14:59
dogweather has joined #ruby
15:02
chouhoulis has joined #ruby
15:04
bijan_ has quit [Ping timeout: 252 seconds]
15:07
dumptruckman has quit [Ping timeout: 264 seconds]
15:09
dumptruckman has joined #ruby
15:10
bijan_ has joined #ruby
15:15
bijan_ has quit [Ping timeout: 252 seconds]
15:15
despai has quit [Quit: ...]
15:16
RougeR has quit [Quit: Leaving]
15:16
j416 has joined #ruby
15:17
Tempesta has quit [Read error: Connection reset by peer]
15:17
Tempesta has joined #ruby
15:21
polishdub has joined #ruby
15:21
aupadhye has quit [Remote host closed the connection]
15:22
bijan_ has joined #ruby
15:22
jottr has quit [Ping timeout: 246 seconds]
15:23
lomex has joined #ruby
15:25
DTZUZO has quit [Ping timeout: 240 seconds]
15:26
bijan_ has quit [Ping timeout: 252 seconds]
15:28
bmurt has quit [Read error: Connection reset by peer]
15:29
bmurt has joined #ruby
15:33
troys has joined #ruby
15:33
bijan_ has joined #ruby
15:36
mroutis has joined #ruby
15:36
dogweather has quit [Remote host closed the connection]
15:38
bijan_ has quit [Ping timeout: 252 seconds]
15:45
bijan_ has joined #ruby
15:49
alex`` has joined #ruby
15:49
bijan_ has quit [Ping timeout: 252 seconds]
15:49
nicesignal has quit [Remote host closed the connection]
15:50
nicesignal has joined #ruby
15:51
aufi has quit [Remote host closed the connection]
15:52
DTZUZO has joined #ruby
15:55
MoritaShinobu has joined #ruby
15:56
bijan_ has joined #ruby
15:57
al2o3-cr has quit [Quit: WeeChat 2.2]
15:59
MoritaShinobu has quit [Client Quit]
16:00
gr33n7007h has joined #ruby
16:00
MoritaShinobu has joined #ruby
16:01
bijan_ has quit [Ping timeout: 252 seconds]
16:01
jcarl43 has joined #ruby
16:04
MoritaShinobu has quit [Client Quit]
16:05
MoritaShinobu has joined #ruby
16:06
gr33n7007h is now known as al2o3-cr
16:06
dionysus69 has quit [Ping timeout: 246 seconds]
16:07
MoritaShinobu has quit [Client Quit]
16:08
lemonandroid has quit [Ping timeout: 252 seconds]
16:08
MoritaShinobu has joined #ruby
16:08
bijan_ has joined #ruby
16:10
alex`` has quit [Quit: WeeChat 2.2]
16:11
alex`` has joined #ruby
16:12
eckhardt_ has joined #ruby
16:12
dogweather has joined #ruby
16:12
bijan_ has quit [Ping timeout: 252 seconds]
16:17
dogweather has quit [Ping timeout: 246 seconds]
16:19
bijan_ has joined #ruby
16:20
bijan_ has quit [Read error: Connection reset by peer]
16:22
kapil___ has quit [Quit: Connection closed for inactivity]
16:23
orbyt_ has joined #ruby
16:23
TomyWork has quit [Remote host closed the connection]
16:23
jane_booty_doe has joined #ruby
16:26
sysvalve has quit [Quit: Leaving]
16:26
Beams has quit [Quit: .]
16:27
bijan_ has joined #ruby
16:27
bijan_ has quit [Client Quit]
16:28
Nicmavr has joined #ruby
16:28
bmurt has quit [Read error: Connection reset by peer]
16:29
alex`` has quit [Quit: WeeChat 2.2]
16:29
bmurt has joined #ruby
16:31
c0ncealed2 has quit [Read error: Connection reset by peer]
16:31
doubledup has joined #ruby
16:32
c0ncealed2 has joined #ruby
16:38
yohji has quit [Remote host closed the connection]
16:57
ShekharReddy has joined #ruby
16:59
reber has left #ruby ["Leaving"]
17:08
dbz has joined #ruby
17:08
dbz_ has joined #ruby
17:09
ShekharReddy has quit []
17:12
dbz has quit [Ping timeout: 240 seconds]
17:17
ShekharReddy has joined #ruby
17:18
fluxAeon has quit [Ping timeout: 246 seconds]
17:29
bmurt has quit [Read error: Connection reset by peer]
17:30
bmurt has joined #ruby
17:30
fluxAeon has joined #ruby
17:31
sticaz has quit [Quit: BELLA LI!]
17:32
kapil___ has joined #ruby
17:33
lxsameer has quit [Ping timeout: 245 seconds]
17:36
DTZUZO has quit [Ping timeout: 245 seconds]
17:37
sticaz has joined #ruby
17:37
nofxx has quit [Remote host closed the connection]
17:37
nofxx has joined #ruby
17:39
lxsameer has joined #ruby
17:40
dextrey has joined #ruby
17:42
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:44
lxsameer has quit [Ping timeout: 240 seconds]
17:47
jane_booty_doe has quit [Quit: Leaving]
17:49
lxsameer has joined #ruby
17:53
fmcgeough has quit [Quit: fmcgeough]
17:53
bmurt has joined #ruby
17:54
lxsameer has quit [Ping timeout: 245 seconds]
17:58
thejs has quit [Ping timeout: 240 seconds]
17:59
lxsameer has joined #ruby
18:02
sylario has quit [Quit: Connection closed for inactivity]
18:03
Rapture has joined #ruby
18:04
lxsameer has quit [Ping timeout: 240 seconds]
18:07
jcarl43 has quit [Ping timeout: 244 seconds]
18:09
lxsameer has joined #ruby
18:13
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:14
lxsameer has quit [Ping timeout: 245 seconds]
18:19
lxsameer has joined #ruby
18:21
marz_d`ghostman has joined #ruby
18:21
<
marz_d`ghostman >
How do I get the right size of a directory? File.stat(dir).size seems to return an incorrect one.
18:22
<
apeiros >
marz_d`ghostman: you'll have to sum the sizes of all files in the directory
18:23
<
havenwood >
marz_d`ghostman: You want just the files in the directory itself or also files in subdirectories?
18:23
despai has joined #ruby
18:23
lxsameer has quit [Ping timeout: 240 seconds]
18:25
nowhere_man has joined #ruby
18:26
<
havenwood >
marz_d`ghostman: Dir.each_child('.').sum &File.method(:size)
18:26
<
apeiros >
I think that won't work for anything but the cwd
18:27
<
apeiros >
at least iirc each_child yields only the filename, not the path, no?
18:27
* apeiros
should probably test that, but feels too lazy rn 0:-)
18:27
<
havenwood >
apeiros: good point, it's not full paths
18:28
<
apeiros >
Dir.glob would be relative, so should work. but needs a flag for dot-files
18:29
lxsameer has joined #ruby
18:33
<
havenwood >
Pathname(dir).each_child.sum &File.method(:size)
18:33
<
havenwood >
apeiros: Or the Pathname variant of #children and #each_child takes an argument that defaults to full path.
18:34
jane_booty_doe has joined #ruby
18:34
lxsameer has quit [Ping timeout: 252 seconds]
18:35
<
marz_d`ghostman >
havenwood: apeiros thanks
18:35
mroutis has quit [Ping timeout: 252 seconds]
18:35
<
havenwood >
marz_d`ghostman: no prob. you don't need it recursive into directories then?
18:36
<
marz_d`ghostman >
havenwood: oh, also the subdirectories, I want the size of everything in the given directory
18:37
fmcgeough has joined #ruby
18:38
<
havenwood >
marz_d`ghostman: require 'find'; Find.find('.').sum { |path| File.file?(path) ? File.size(path) : 0 }
18:38
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:39
lxsameer has joined #ruby
18:40
despai has quit [Read error: Connection reset by peer]
18:40
despai has joined #ruby
18:41
<
havenwood >
marz_d`ghostman: Or if you want to include directory size: Find.find(dir).sum &File.method(:size)
18:42
<
marz_d`ghostman >
havenwood: isn't the directory size derived from all the files inside it?
18:42
<
havenwood >
marz_d`ghostman: For example, check: File.size('.')
18:42
<
havenwood >
marz_d`ghostman: nope
18:43
akaiiro has quit [Ping timeout: 240 seconds]
18:43
<
marz_d`ghostman >
havenwood: so a directory can have a different size of itself?
18:44
lxsameer has quit [Ping timeout: 240 seconds]
18:45
<
havenwood >
marz_d`ghostman: Directories are files too.
18:45
<
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.
18:46
<
havenwood >
marz_d`ghostman: So it depends on what you're trying to count.
18:46
<
havenwood >
Whether you'll want to include the file size of the directories.
18:47
<
marz_d`ghostman >
havenwood: ah I get it now, everything is a file in unix
18:49
lxsameer has joined #ruby
18:54
lxsameer has quit [Ping timeout: 245 seconds]
18:57
solocshaw has joined #ruby
18:59
lxsameer has joined #ruby
18:59
solocshaw has quit [Client Quit]
19:03
lemonandroid has joined #ruby
19:03
thejs has joined #ruby
19:04
lxsameer has quit [Ping timeout: 252 seconds]
19:09
lxsameer has joined #ruby
19:13
snickers has joined #ruby
19:14
lxsameer has quit [Ping timeout: 246 seconds]
19:16
MoritaShinobu has quit [Ping timeout: 245 seconds]
19:17
<
kapil___ >
i have `args: { qinput: [{ EntityClassIdVal1 : C.EntityClass.CustomerId}]}` in yaml file. but `C.EntityClass.CustomerId` is not a string
19:18
<
kapil___ >
how to not parse it as string
19:19
<
havenwood >
kapil___: What is it supposed to be? Where'd that YAML come from?
19:19
lxsameer has joined #ruby
19:22
<
kapil___ >
havenwood: its my own yaml file
19:22
<
kapil___ >
i did `args = obj.dig('args')`
19:22
<
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
19:22
<
kapil___ >
`pretty_json(args).gsub(": \"", ": ").gsub("\"}]}", "")`
19:24
lxsameer has quit [Ping timeout: 240 seconds]
19:24
<
lemonandroid >
kapil___you don't want it to be a string but it is currently a string?
19:24
<
havenwood >
marz_d`ghostman: When compared to?: Find.find('.').sum { |path| File.file?(path) ? File.size(path) : 0 }
19:24
<
kapil___ >
lemonandroid: yes
19:24
<
marz_d`ghostman >
havenwood: Find.find(dir).sum &File.method(:size)
19:24
<
lemonandroid >
kapil___What do you want it to be?
19:25
<
kapil___ >
its a string but without quotes
19:25
bmurt has joined #ruby
19:26
<
lemonandroid >
kapil___i don't understand
19:26
<
kapil___ >
I am writing a generator, so i want to print it as without quotes
19:26
<
havenwood >
marz_d`ghostman: du doesn't count the filesize of directories themselves
19:27
<
lemonandroid >
kapil___to a file?
19:27
<
marz_d`ghostman >
havenwood: but it shows a greater size
19:27
<
kapil___ >
lemonandroid: yes its javascript file
19:28
<
havenwood >
marz_d`ghostman: Maybe because?: "The du utility counts the storage used by symbolic links and not the files they reference"
19:28
snickers has quit [Ping timeout: 252 seconds]
19:28
<
lemonandroid >
kapil___thanks, I understand now, let me think for a while
19:29
<
marz_d`ghostman >
havenwood: that would mean the symbolic links has greater size than those files they reference. Plausible
19:29
lxsameer has joined #ruby
19:30
rupam123456 has joined #ruby
19:30
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:31
dogweather has joined #ruby
19:31
MoritaShinobu has joined #ruby
19:32
<
havenwood >
marz_d`ghostman: how about du with -L flag too?
19:32
lenqbit has joined #ruby
19:32
<
havenwood >
-L, --dereference dereference all symbolic links
19:33
<
havenwood >
marz_d`ghostman: or --apparent-size
19:33
<
marz_d`ghostman >
havenwood: still the same size as before, 61440
19:33
<
havenwood >
marz_d`ghostman: how about --apparent-size?
19:33
<
marz_d`ghostman >
havenwood: that did it
19:33
<
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
19:33
<
havenwood >
"holes in (`sparse') files, internal fragmentation, indirect blocks, and the like"
19:34
<
marz_d`ghostman >
havenwood: don't really understand that one haha
19:34
lxsameer has quit [Ping timeout: 245 seconds]
19:34
<
havenwood >
marz_d`ghostman: do you have an encrypted filesystem?
19:35
<
marz_d`ghostman >
havenwood: nope, just plan ext4
19:36
<
lemonandroid >
kapil___Is the yaml snippet you posted earlier part of a bigger yaml file?
19:36
cek has joined #ruby
19:36
akem has joined #ruby
19:37
<
marz_d`ghostman >
havenwood: I'll give that a read, thanks for the help. I appreciate it. :)
19:37
<
havenwood >
marz_d`ghostman: you're welcome
19:38
<
kapil___ >
lemonandroid: yes, its
19:39
MoritaShinobu has quit [Quit: Leaving]
19:39
Cthulu201 has quit [Quit: Nowhere special. I always wanted to go there.]
19:39
lxsameer has joined #ruby
19:40
Cthulu201 has joined #ruby
19:41
<
lemonandroid >
kapil___ how about `YAML.dump(args)`?
19:41
jcarl43 has joined #ruby
19:42
<
kapil___ >
lemonandroid: somewhere in the code i have `@yamlConfig = YAML.load_file(File.expand_path('config.yaml', __dir__))`
19:43
<
lemonandroid >
@kapi
19:43
<
lemonandroid >
kapil___I mean `YAML.dump` instead of `pretty_json`
19:43
<
kapil___ >
wait i try it
19:44
lxsameer has quit [Ping timeout: 246 seconds]
19:45
<
kapil___ >
lemonandroid: thanks, it worked. but what it does,
19:46
<
kapil___ >
lemonandroid: no its not work
19:46
<
kapil___ >
it print empty {} as value
19:47
dbz_ has quit [Remote host closed the connection]
19:47
knight33 has joined #ruby
19:47
<
kapil___ >
it outputs `"--- {}\n"`
19:48
<
lemonandroid >
what's the associated code snippet?
19:48
<
lemonandroid >
`YAML.dump(args)`? if so, what's the value of args
19:49
dextrey has quit [Ping timeout: 240 seconds]
19:49
lxsameer has joined #ruby
19:49
dbz has joined #ruby
19:50
<
kapil___ >
`puts args` results `{"qinput"=>[{"EntityClassIdVal1"=>"C.EntityClass.CustomerId"}]}`
19:51
<
lemonandroid >
please do args.inspect
19:51
<
lemonandroid >
please do `puts args.inspect`
19:51
<
kapil___ >
`YAML.dump(args)` results `"---\nqinput:\n- EntityClassIdVal1: C.EntityClass.CustomerId\n"`
19:51
<
kapil___ >
`puts args.inspect
19:51
<
kapil___ >
{"qinput"=>[{"EntityClassIdVal1"=>"C.EntityClass.CustomerId"}]}`
19:52
dellavg_ has quit [Ping timeout: 246 seconds]
19:52
<
lemonandroid >
kapil___ok, sure, yaml wont work
19:53
<
kapil___ >
lemonandroid: dump work for what other file types?
19:53
<
lemonandroid >
kapil___i was probalby hoping that it is magically working, i think yaml also supports the syntax that you need
19:54
lxsameer has quit [Ping timeout: 252 seconds]
19:54
<
kapil___ >
thanks will check it later
19:57
marz_d`ghostman has quit [Quit: Page closed]
19:59
lxsameer has joined #ruby
20:00
dogweather has quit [Remote host closed the connection]
20:03
fmcgeough has quit [Quit: fmcgeough]
20:04
lxsameer has quit [Ping timeout: 240 seconds]
20:05
dogweather has joined #ruby
20:08
eckhardt_ has joined #ruby
20:09
lxsameer has joined #ruby
20:10
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
20:11
Zaab1t has joined #ruby
20:12
graft has joined #ruby
20:12
<
graft >
hey all, my sysadmin wants to know if there are built-in tests to validate a ruby installation after building from source
20:13
<
graft >
i'm not familiar with any such, does something like this exist?
20:13
<
cek >
yeah. run rails tests
20:14
dogweather has quit [Ping timeout: 246 seconds]
20:14
<
graft >
rails is not ruby
20:14
lxsameer has quit [Ping timeout: 240 seconds]
20:14
<
cek >
long time ago, some ruby implementations couldn't pass them
20:14
<
apeiros >
graft: `make test`
20:14
<
cek >
and ruby is not rails?
20:14
<
apeiros >
no, ruby is not rails cek
20:15
JamJam_kid has joined #ruby
20:16
<
graft >
apeiros: make test, makes sense
20:16
<
graft >
now i just need to figure out how ruby-build does such a thing
20:16
<
graft >
might do it automatically
20:16
<
apeiros >
`make sense`, I wish that command existed for irc ;-D
20:17
knight33 has joined #ruby
20:18
dogweather has joined #ruby
20:19
<
lemonandroid >
`be humble` would also be cool
20:19
lxsameer has joined #ruby
20:23
dogweather has quit [Ping timeout: 246 seconds]
20:24
lxsameer has quit [Ping timeout: 246 seconds]
20:24
doubledup has quit [Quit: Leaving]
20:27
lenqbit has quit [Ping timeout: 252 seconds]
20:28
graft has quit [Ping timeout: 245 seconds]
20:31
orbyt_ has joined #ruby
20:33
thejs has quit [Ping timeout: 246 seconds]
20:35
<
bathtub_shark >
apeiros: it's not called "make" on irc, it's called "/kick" ;)
20:35
<
apeiros >
ah, but kick is overpowered for people who can't manage to make sense :)
20:37
KeyJoo has joined #ruby
20:38
<
bathtub_shark >
that depends on how persistent they are in not making sense
20:38
eckhardt_ has joined #ruby
20:42
sticaz has quit [Quit: BELLA LI!]
20:42
ramfjord has joined #ruby
20:42
<
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
20:43
JamJam_kid has quit [Remote host closed the connection]
20:45
<
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.
20:46
<
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...
20:47
<
ramfjord >
JJonah: that could just be because stdout is buffered, not necessarily because the thread hasn't executed
20:48
<
ramfjord >
try `STDOUT.sync = true`
20:48
<
JJonah >
ramfjord: ah! you're right. if i raise an exception it goes immediately. ty
20:49
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:50
lomex has joined #ruby
20:53
thejs has joined #ruby
20:54
kspencer has joined #ruby
20:54
lomex has quit [Ping timeout: 260 seconds]
20:57
<
havenwood >
JJonah: You can also: puts "hi\n"
20:58
<
JJonah >
havenwood: ty, good to know
20:58
<
havenwood >
JJonah: An explicit newline prints in the same operation as the line.
20:59
dbz_ has joined #ruby
21:02
dbz__ has joined #ruby
21:03
polishdub has quit [Quit: leaving]
21:03
dbz has quit [Ping timeout: 252 seconds]
21:05
dbz_ has quit [Ping timeout: 252 seconds]
21:05
ivanskie has joined #ruby
21:05
Puffball has quit [Remote host closed the connection]
21:11
<
apeiros >
bathtub_shark: yeah, there's some truth to that :D
21:18
LiftLeft has quit [Remote host closed the connection]
21:19
dbz__ has quit [Remote host closed the connection]
21:19
tdy has joined #ruby
21:20
dbz has joined #ruby
21:20
LiftLeft has joined #ruby
21:21
dbz has quit [Remote host closed the connection]
21:22
dbz has joined #ruby
21:29
LiftLeft2 has joined #ruby
21:29
LiftLeft has quit [Ping timeout: 240 seconds]
21:30
LiftLeft2 is now known as LiftLeft
21:30
dbz has quit [Remote host closed the connection]
21:34
<
lemonandroid >
kapil___did the gist help?
21:35
ramfjord has quit [Ping timeout: 272 seconds]
21:36
MiLLiYEtCHi has joined #ruby
21:37
clorisu has joined #ruby
21:41
dextrey has joined #ruby
21:43
Dbugger has quit [Ping timeout: 240 seconds]
21:45
Zaab1t has quit [Quit: Zaab1t]
21:52
akaiiro has joined #ruby
21:54
rkoller has joined #ruby
22:02
kapil___ has quit [Quit: Connection closed for inactivity]
22:03
<
cthulchu >
what does this mean? end.parse!
22:03
<
baweaver >
cthulchu: OptParser probably
22:03
<
baweaver >
Read its docs
22:04
<
baweaver >
Has a bang because it mutates ARGV, which is why I tend to prefer ljarvis's Slop instead.
22:04
<
baweaver >
Bang = !
22:06
Creatornator has joined #ruby
22:10
dbz has joined #ruby
22:10
tdy has quit [Ping timeout: 246 seconds]
22:10
eckhardt_ has joined #ruby
22:10
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
22:12
dbz has quit [Remote host closed the connection]
22:13
dbz has joined #ruby
22:13
druonysus has joined #ruby
22:15
cinnamntig3r has joined #ruby
22:15
apeiros has quit [Remote host closed the connection]
22:16
mroutis has joined #ruby
22:16
dbz has quit [Remote host closed the connection]
22:16
dbz has joined #ruby
22:18
paraxial has joined #ruby
22:19
chouhoulis has quit [Ping timeout: 252 seconds]
22:26
cek has quit [Quit: Connection closed for inactivity]
22:27
lxsameer has joined #ruby
22:28
orbyt_ has joined #ruby
22:32
lxsameer has quit [Ping timeout: 252 seconds]
22:33
DTZUZO has joined #ruby
22:34
<
nofxx >
cthulchu, something { bla }.and(foo) == something do bla end.and(foo)
22:34
<
baweaver >
(though the second is super super ugly and makes baweaver cry)
22:37
<
nofxx >
baweaver, it makes me want to buy an AR-15 or maybe steal a tank... well, same trigger, different reactions
22:37
<
baweaver >
Maybe a bit much for the channel.
22:37
<
baweaver >
Also not a fan of implied violence or jokes thereto
22:38
<
cthulchu >
nofxx, I didn't know we could do that... I don't know how it workd
22:38
<
cthulchu >
is and a method of the something?
22:38
<
baweaver >
Blocks can be delimited with `do ... end` or `{ ... }`
22:38
<
cthulchu >
that I kno
22:39
<
cthulchu >
how can we do . to blocks
22:39
<
nofxx >
cthulchu, a method of the block's response
22:39
<
cthulchu >
and how it works
22:39
KeyJoo has quit [Ping timeout: 246 seconds]
22:39
<
nofxx >
baweaver, bah, no 'buts and ifs' on jokes
22:39
<
cthulchu >
you mean return
22:39
<
cthulchu >
a method of the block's return
22:39
<
cthulchu >
now will that thing fire on every method call?
22:41
troulouliou_dev has joined #ruby
22:41
troulouliou_dev has quit [Remote host closed the connection]
22:42
apeiros has joined #ruby
22:44
troulouliou_dev has joined #ruby
22:45
joast has quit [Quit: Leaving.]
22:45
joast has joined #ruby
22:46
apeiros has quit [Ping timeout: 252 seconds]
22:57
dextrey has quit [Ping timeout: 252 seconds]
22:57
troulouliou_dev has quit [Quit: Leaving]
22:58
akaiiro has quit [Ping timeout: 244 seconds]
22:58
teej has quit [Quit: Connection closed for inactivity]
23:02
dbz has quit [Remote host closed the connection]
23:02
dbz has joined #ruby
23:02
dbz has quit [Remote host closed the connection]
23:04
troulouliou_dev has joined #ruby
23:05
apeiros has joined #ruby
23:06
troulouliou_dev has quit [Client Quit]
23:07
dbz has joined #ruby
23:07
dbz has quit [Remote host closed the connection]
23:07
dbz has joined #ruby
23:09
apeiros has quit [Ping timeout: 246 seconds]
23:10
canton7 has joined #ruby
23:11
<
clorisu >
whats the difference between hash and hsh?
23:12
<
baweaver >
One is missing an a
23:12
<
baweaver >
What code did you see it in?
23:13
Nuru has joined #ruby
23:17
nowhere_man has quit [Ping timeout: 245 seconds]
23:26
apeiros has joined #ruby
23:30
<
clorisu >
baweaver: in the ruby docs
23:30
apeiros has quit [Ping timeout: 252 seconds]
23:35
jane_booty_doe has quit [Quit: Leaving]
23:36
dbz has quit [Ping timeout: 244 seconds]
23:36
mroutis has quit [Remote host closed the connection]
23:37
desperek has quit [Quit: xoxo]
23:48
apeiros has joined #ruby
23:51
arescorpio has joined #ruby
23:53
apeiros has quit [Ping timeout: 272 seconds]
23:54
thejs has quit [Remote host closed the connection]
23:57
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
23:59
agent_white has quit [Ping timeout: 246 seconds]