00:00
PCiobanita has quit [Ping timeout: 256 seconds]
00:10
AJA4350 has joined #ruby
00:11
Puffball has quit [Remote host closed the connection]
00:11
davidw has quit [Ping timeout: 272 seconds]
00:14
tdy2 has joined #ruby
00:20
tdy2 has quit [Ping timeout: 252 seconds]
00:22
mspo has left #ruby [#ruby]
00:31
catbusters has joined #ruby
00:46
profetes_ has quit [Quit: Leaving]
00:50
tdy2 has joined #ruby
00:51
sarink has joined #ruby
00:56
tdy2 has quit [Ping timeout: 252 seconds]
00:57
mostlybadfly has quit [Quit: Connection closed for inactivity]
01:09
hanmac has joined #ruby
01:28
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:33
AJA4351 has joined #ruby
01:33
AJA4350 has quit [Ping timeout: 246 seconds]
01:33
AJA4351 is now known as AJA4350
01:35
houhoulis has quit [Remote host closed the connection]
01:44
sarink has quit [Remote host closed the connection]
01:45
m27frogy has joined #ruby
01:54
orbyt_ has joined #ruby
01:55
hanmac has quit [Ping timeout: 245 seconds]
01:58
Rich_Morin_ has joined #ruby
02:04
hutch has joined #ruby
02:06
esrse has joined #ruby
02:06
houhoulis has joined #ruby
02:06
uplime has joined #ruby
02:06
mostlybadfly has joined #ruby
02:10
tdy2 has joined #ruby
02:16
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:33
bmurt has joined #ruby
02:45
AJA4350 has quit [Ping timeout: 258 seconds]
02:52
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:52
themsay has joined #ruby
02:53
dbugger_ has joined #ruby
02:55
hutch has quit [Ping timeout: 258 seconds]
02:56
Dbugger has quit [Ping timeout: 264 seconds]
02:56
sarink has joined #ruby
02:59
hutch has joined #ruby
03:03
tdy2 has quit [Ping timeout: 250 seconds]
03:05
tdy2 has joined #ruby
03:07
sarink has quit [Remote host closed the connection]
03:10
catbusters has quit [Quit: Connection closed for inactivity]
03:11
sarink has joined #ruby
03:12
Rich_Morin_ has quit [Quit: Rich_Morin_]
03:12
Rich_Morin_ has joined #ruby
03:13
Rich_Morin_ has quit [Client Quit]
03:13
Rich_Morin_ has joined #ruby
03:13
uplime has quit [Quit: WeeChat 2.2]
03:13
Rich_Morin_ has quit [Client Quit]
03:14
Rich_Morin_ has joined #ruby
03:14
Rich_Morin_ has quit [Client Quit]
03:14
sarink has quit [Remote host closed the connection]
03:15
Rich_Morin_ has joined #ruby
03:15
sarink has joined #ruby
03:15
Rich_Morin_ has quit [Client Quit]
03:15
Rich_Morin_ has joined #ruby
03:16
Rich_Morin_ has quit [Client Quit]
03:16
Rich_Morin_ has joined #ruby
03:17
sarink has quit [Remote host closed the connection]
03:17
Rich_Morin_ has quit [Client Quit]
03:17
sarink has joined #ruby
03:20
hutch has quit [Ping timeout: 245 seconds]
03:27
hutch has joined #ruby
03:30
Rich_Morin_ has joined #ruby
03:42
TheNet is now known as Net
03:45
Net is now known as TheNet
03:46
TheNet is now known as Net
03:49
Net has joined #ruby
03:49
<
Net >
whois net net
03:53
hutch has quit [Ping timeout: 272 seconds]
04:01
tdy2 has quit [Ping timeout: 268 seconds]
04:03
orbyt_ has joined #ruby
04:05
braincrash has quit [Quit: bye bye]
04:10
braincrash has joined #ruby
04:19
hutch has joined #ruby
04:27
Swyper has joined #ruby
04:29
Rich_Morin_ has quit [Quit: Rich_Morin_]
04:29
Rich_Morin_ has joined #ruby
04:29
Rich_Morin_ has quit [Client Quit]
04:30
Rich_Morin_ has joined #ruby
04:30
Rich_Morin_ has quit [Client Quit]
04:31
Rich_Morin_ has joined #ruby
04:31
Rich_Morin_ has quit [Client Quit]
04:31
Rich_Morin_ has joined #ruby
04:32
Rich_Morin_ has quit [Client Quit]
04:32
Rich_Morin_ has joined #ruby
04:33
Rich_Morin_ has quit [Client Quit]
04:33
Rich_Morin_ has joined #ruby
04:33
Rich_Morin_ has quit [Client Quit]
04:34
Rich_Morin_ has joined #ruby
04:34
Rich_Morin_ has quit [Client Quit]
04:35
Rich_Morin_ has joined #ruby
04:35
sauvin_ has joined #ruby
04:35
sauvin has quit [Ping timeout: 272 seconds]
04:35
Rich_Morin_ has quit [Client Quit]
04:35
Rich_Morin_ has joined #ruby
04:36
Rich_Morin_ has quit [Client Quit]
04:40
houhoulis has quit [Remote host closed the connection]
04:45
Rich_Morin_ has joined #ruby
04:45
dellavg_ has joined #ruby
04:48
porg has joined #ruby
04:49
davidw has joined #ruby
04:49
Rich_Morin_ has quit [Client Quit]
05:01
evdubs_ has joined #ruby
05:03
evdubs has quit [Ping timeout: 250 seconds]
05:06
sauvin_ is now known as Sauvin
05:09
tdy2 has joined #ruby
05:10
hutch has quit [Ping timeout: 272 seconds]
05:12
Swyper has quit [Remote host closed the connection]
05:14
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:18
_whitelogger has joined #ruby
05:18
uplime has joined #ruby
05:31
davidw has quit [Ping timeout: 246 seconds]
05:33
idiocrash has joined #ruby
05:44
saltsa has quit [Quit: leaving]
05:52
mikecmpbll has quit [Quit: inabit. zz.]
05:59
dellavg_ has quit [Ping timeout: 246 seconds]
06:01
\void has joined #ruby
06:07
mostlybadfly has quit [Quit: Connection closed for inactivity]
06:09
tdy2 has quit [Ping timeout: 272 seconds]
06:12
SuperLag has quit [Remote host closed the connection]
06:14
SuperLag has joined #ruby
06:19
conta has joined #ruby
06:25
Inline has quit [Quit: Leaving]
06:25
idiocrash has quit [Read error: Connection reset by peer]
06:26
idiocrash has joined #ruby
06:28
tdy2 has joined #ruby
06:38
\void has quit [Quit: So long, and thanks for all the fish.]
06:49
aufi has joined #ruby
06:53
aupadhye has joined #ruby
07:03
porg has quit [Ping timeout: 268 seconds]
07:03
Nicmavr has quit [Read error: Connection reset by peer]
07:05
Nicmavr has joined #ruby
07:10
ziyadb has joined #ruby
07:12
cthulchu has quit [Ping timeout: 240 seconds]
07:14
cthulchu has joined #ruby
07:21
gix has joined #ruby
07:24
drale2k_ has joined #ruby
07:30
gix has quit [Ping timeout: 246 seconds]
07:36
am0123 has joined #ruby
07:41
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
07:44
dminuoso has joined #ruby
07:45
tdy2 has quit [Ping timeout: 245 seconds]
07:46
dminuoso has left #ruby ["WeeChat 2.0.1"]
08:02
CrazyEddy has quit [Remote host closed the connection]
08:11
SqREL has joined #ruby
08:16
SqREL has quit [Remote host closed the connection]
08:17
SqREL has joined #ruby
08:20
clemens3 has joined #ruby
08:21
vondruch has quit [Quit: vondruch]
08:22
SqREL has quit [Ping timeout: 258 seconds]
08:25
status402 has joined #ruby
08:38
kapil____ has joined #ruby
08:41
mikecmpbll has joined #ruby
08:42
themsay has quit [Ping timeout: 246 seconds]
08:44
apparition has joined #ruby
08:47
SqREL has joined #ruby
08:47
vondruch has joined #ruby
08:49
mikecmpbll has quit [Quit: inabit. zz.]
08:49
ellcs has joined #ruby
08:55
idiocras_ has joined #ruby
08:55
aupadhye has quit [Remote host closed the connection]
08:56
mikecmpbll has joined #ruby
08:58
idiocrash has quit [Ping timeout: 258 seconds]
08:59
aupadhye has joined #ruby
09:01
SqREL has quit [Remote host closed the connection]
09:03
tdy2 has joined #ruby
09:05
queip has quit [Ping timeout: 268 seconds]
09:05
paranoicsan has joined #ruby
09:07
themsay has joined #ruby
09:11
mat_bug has joined #ruby
09:11
sarink has quit [Remote host closed the connection]
09:12
sarink has joined #ruby
09:14
mat_bug has quit [Remote host closed the connection]
09:16
sarink has quit [Ping timeout: 250 seconds]
09:16
ur5us has joined #ruby
09:19
queip has joined #ruby
09:24
uplime has quit [Ping timeout: 258 seconds]
09:32
paranoicsan has quit [Quit: paranoicsan]
09:38
za1b1tsu has joined #ruby
09:41
queip has quit [Ping timeout: 250 seconds]
09:45
ur5us has quit [Read error: Connection reset by peer]
09:45
ur5us has joined #ruby
09:47
queip has joined #ruby
09:48
alexterziev has joined #ruby
09:49
paranoicsan has joined #ruby
09:57
tdy2 has quit [Ping timeout: 272 seconds]
10:00
ur5us has quit [Remote host closed the connection]
10:00
profetes has joined #ruby
10:01
dhollin3 has joined #ruby
10:01
uplime has joined #ruby
10:04
dhollinger has quit [Ping timeout: 252 seconds]
10:16
status402 has quit [Read error: Connection reset by peer]
10:16
status402 has joined #ruby
10:20
alexterziev has quit [Ping timeout: 256 seconds]
10:25
x0f has quit [Ping timeout: 272 seconds]
10:32
gigetoo has quit [Ping timeout: 258 seconds]
10:33
gigetoo has joined #ruby
10:34
x0f has joined #ruby
10:34
uplime has quit [Ping timeout: 245 seconds]
10:39
Sauvin has quit [Ping timeout: 246 seconds]
10:40
x0f_ has joined #ruby
10:40
x0f has quit [Ping timeout: 250 seconds]
10:43
Sauvin has joined #ruby
10:50
sauvin_ has joined #ruby
10:51
Sauvin has quit [Ping timeout: 245 seconds]
10:53
brandonkal has joined #ruby
10:56
sauvin_ is now known as Sauvin
11:09
gregf_ has joined #ruby
11:18
rikkipitt has joined #ruby
11:18
soyeomul^bionic has joined #ruby
11:20
<
soyeomul^bionic >
i would like to run with linux shell commands such as grep awk sed xargs
11:20
<
soyeomul^bionic >
is that possible with ruby?
11:21
<
phaul >
you can run shell commands like `ls -a`
11:21
<
phaul >
&ri Kernel#`
11:23
<
soyeomul^bionic >
wow that is easy more than python.
11:24
<
soyeomul^bionic >
ruby good!!!
11:24
AJA4350 has joined #ruby
11:30
<
soyeomul^bionic >
question.
11:30
<
soyeomul^bionic >
by the way, what is different `` and exec?
11:33
<
phaul >
exec replaces the current process with the one you point to. it's a lower level primitive. To implement `` you need exec but you also need fork, and capturing the child processs output. `` does a lot more
11:34
<
rubydoc >
I found 2 entries matching method exec. Use &list exec if you would like to see a list
11:34
<
phaul >
&ri Kernel#exec
11:34
esrse has quit [Quit: 굿나잇]
11:35
paranoicsan is now known as paranoicsan[Away
11:35
paranoicsan[Away has quit [Quit: paranoicsan[Away]
11:36
<
soyeomul^bionic >
thanks phaul, you kind man. i take myself study that
11:38
noboruma has quit [Quit: leaving]
11:45
<
soyeomul^bionic >
ruby doc is so cool!!!
11:48
paranoicsan has joined #ruby
12:02
mostlybadfly has joined #ruby
12:07
kapil____ has quit [Quit: Connection closed for inactivity]
12:20
rikkipitt has quit [Quit: Leaving...]
12:23
nowhere_man has quit [Ping timeout: 244 seconds]
12:31
uplime has joined #ruby
12:37
gregf_ has quit [Ping timeout: 256 seconds]
12:42
am0123 has quit [Ping timeout: 245 seconds]
12:49
HCW has joined #ruby
12:51
HCW has left #ruby ["Closing Window"]
12:52
rubydoc has quit [Remote host closed the connection]
12:52
rubydoc has joined #ruby
12:56
catphish has joined #ruby
12:56
<
catphish >
does ruby have a while loop with no block?
12:59
<
canton7 >
catphish, can you give an example of its usage?
12:59
<
canton7 >
what would the point of a while loop which does nothing be?
13:00
<
catphish >
def process_one; something_that_returns_true_or_false; end; while(process_one);
13:01
nowhere_man has joined #ruby
13:01
<
catphish >
i've been writing C for a couple of weeks and i'm in the habit of writing: while(something_that_processes_and_tests);
13:02
<
catphish >
the use base being to have one method that processes something once, and a separate method that runs it repeatedly, but allows the loop to be broken
13:03
<
catphish >
canton7: so the loop doesn't do nothing, it's just that the work is done as part of the test
13:05
uplime has quit [Ping timeout: 252 seconds]
13:06
<
canton7 >
ah, gotcha. I think you'll have to write it the same way as in C, with an empty block
13:07
<
catphish >
i suppose in C it's just an empty statement (the semi-colon at the end is actually a complete statement hat does nothing)
13:08
<
catphish >
this is ok, just not that pretty: while process_once; end
13:09
<
canton7 >
'while (process_once) { }' ?
13:10
jottr has joined #ruby
13:10
<
catphish >
canton7: i think "while" implies "begin"
13:10
<
phaul >
while in ruby is a keyword not a method. and it has a body not a block
13:10
<
canton7 >
yeah, I wasn't thinking
13:11
<
phaul >
loop on the other hand is a method.
13:11
<
catphish >
phaul: makes sense
13:11
Dreamer3_ has quit [Quit: Leaving...]
13:11
<
catphish >
i didn't know that, explains why it's loop
*do*
13:18
vondruch_ has joined #ruby
13:20
vondruch has quit [Ping timeout: 258 seconds]
13:20
vondruch_ is now known as vondruch
13:20
apparition has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
13:21
jcalla has quit [Ping timeout: 268 seconds]
13:23
gregf_ has joined #ruby
13:24
uplime has joined #ruby
13:30
aupadhye has quit [Ping timeout: 258 seconds]
13:30
CrazyEddy has joined #ruby
13:31
soyeomul^bionic has quit [Quit: ERC (IRC client for Emacs 26.1)]
13:34
<
leftylink >
uh I guess if you wanted to golf it you can use postfix while on _
13:34
<
leftylink >
so like
13:34
<
leftylink >
&>> a=0; f=->{a+1>3}; _ while f[]; p :hello
13:36
nowhere_man has quit [Ping timeout: 252 seconds]
13:38
<
phaul >
i expected undefined local variable or method _
13:38
dinfuehr has quit [Ping timeout: 246 seconds]
13:38
<
leftylink >
oops, can you not do that in a script... uh, maybe something silly like `0 while f[]` then
13:39
<
leftylink >
that's a "correct! nil! wat" moment
13:40
dinfuehr has joined #ruby
13:41
<
phaul >
&>> a=0; f=->{a+1<3}; _ while f[]; p :hello
13:43
<
leftylink >
I also meant a+=1
13:43
<
leftylink >
should have printed out more things to verify that things were actually working
13:44
<
leftylink >
facepalm
13:44
<
leftylink >
and that needs parens too, that's great
13:44
<
leftylink >
the += I mean
13:45
<
leftylink >
yeah so I guess it'd be something like
13:45
<
leftylink >
&>> a = []; i = 0; f = ->{ a << i; (i += 1) < 3}; p while f[]; a
13:54
_whitelogger has joined #ruby
13:54
apparition has joined #ruby
13:57
uplime has quit [Ping timeout: 240 seconds]
13:57
apparition has quit [Client Quit]
14:04
vondruch has quit [Quit: vondruch]
14:04
vondruch has joined #ruby
14:15
uplime has joined #ruby
14:15
chromis has joined #ruby
14:16
chromis has left #ruby [#ruby]
14:19
jcalla has joined #ruby
14:23
konos5 has joined #ruby
14:26
cow[moo] has joined #ruby
14:27
krawchyk has joined #ruby
14:27
uplime has quit [Ping timeout: 258 seconds]
14:41
Inline has joined #ruby
14:42
uplime has joined #ruby
14:44
xrexeon has joined #ruby
14:47
uplime has quit [Ping timeout: 252 seconds]
14:49
Rapture has joined #ruby
14:54
cow[moo] has quit [Read error: Connection reset by peer]
14:54
cow[moo] has joined #ruby
14:57
twobitsprite has joined #ruby
15:00
rippa has joined #ruby
15:01
madhatter has quit [Remote host closed the connection]
15:05
madhatter has joined #ruby
15:10
polishdub has joined #ruby
15:14
status402 has quit [Quit: status402]
15:14
status402 has joined #ruby
15:17
conta has quit [Ping timeout: 258 seconds]
15:18
chouhoulis has joined #ruby
15:27
hutch has joined #ruby
15:35
status402 has quit [Read error: Connection reset by peer]
15:35
status402 has joined #ruby
15:37
chouhoulis has quit [Remote host closed the connection]
15:39
dhollin3 is now known as dhollinger
15:52
_axx has left #ruby ["I Must Go, My Planet Needs Me"]
15:56
status402 has quit [Quit: status402]
16:01
bmurt has joined #ruby
16:01
conta has joined #ruby
16:06
conta has quit [Ping timeout: 245 seconds]
16:13
catbusters has joined #ruby
16:13
paranoicsan is now known as paranoicsan[Away
16:14
paranoicsan[Away has quit [Quit: paranoicsan[Away]
16:24
dinfuehr has quit [Ping timeout: 250 seconds]
16:25
dinfuehr has joined #ruby
16:28
elcontrastador has joined #ruby
16:29
davidw has joined #ruby
16:33
ams__ has joined #ruby
16:35
uplime has joined #ruby
16:47
\void has joined #ruby
16:52
sylario has joined #ruby
16:59
sputnik13 has joined #ruby
17:00
profetes has quit [Quit: Leaving]
17:06
aufi has quit [Ping timeout: 240 seconds]
17:06
ellcs has quit [Ping timeout: 246 seconds]
17:07
bak1an has joined #ruby
17:12
orbyt_ has joined #ruby
17:12
paranoicsan[Away has joined #ruby
17:13
orbyt_ has quit [Client Quit]
17:14
conta has joined #ruby
17:18
conta has quit [Ping timeout: 246 seconds]
17:23
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:23
planigan has quit [Ping timeout: 258 seconds]
17:25
planigan has joined #ruby
17:25
bmurt has joined #ruby
17:32
mikecmpbll has quit [Quit: inabit. zz.]
17:36
johnny56 has quit [Read error: Connection reset by peer]
17:38
konos5 has quit [Quit: Connection closed for inactivity]
17:38
NL3limin4t0r_afk is now known as NL3limin4t0r
17:39
hutch has quit [Ping timeout: 258 seconds]
17:40
am0123 has joined #ruby
17:40
paranoicsan[Away has quit [Quit: paranoicsan[Away]
17:41
conta has joined #ruby
17:42
catphish has quit [Quit: Leaving]
17:43
Nicmavr has quit [Read error: Connection reset by peer]
17:43
johnny56 has joined #ruby
17:44
paranoicsan has joined #ruby
17:45
Nicmavr has joined #ruby
17:46
<
za1b1tsu >
I dont understand why would "gogo".match /\w/ # => #<MatchData "g">
17:47
<
uplime >
why it only matched one character?
17:47
<
za1b1tsu >
uplime, yes
17:47
<
uplime >
from the docs: /\w/ - A word character ([a-zA-Z0-9_])
17:48
<
havenwood >
za1b1tsu: Compare with: /\w*/
17:48
<
za1b1tsu >
ah so the equivalent of most regex engines will be /\w+/
17:48
donofrio has joined #ruby
17:49
cthulchu_ has quit [Quit: Leaving]
17:49
cthulchu_ has joined #ruby
17:50
<
phaul >
echo gogo | sed s/./x/ # => xogo
17:50
<
phaul >
sed works the same way
17:52
irightcode2 has joined #ruby
17:53
<
irightcode2 >
can I ask bundler/rake questions here?
17:54
hutch has joined #ruby
17:54
<
phaul >
I mean sure. go for it :)
17:54
<
irightcode2 >
I would like import bundle task from another gem, is this possible
17:55
<
irightcode2 >
rake task. i mean
18:01
orbyt_ has joined #ruby
18:03
conta2 has joined #ruby
18:04
raulp has joined #ruby
18:07
conta2 has quit [Ping timeout: 244 seconds]
18:14
fiachetti has joined #ruby
18:15
clemens3 has quit [Ping timeout: 258 seconds]
18:17
paranoicsan has quit [Quit: paranoicsan]
18:17
za1b1tsu has quit [Ping timeout: 250 seconds]
18:20
sanscoeur has joined #ruby
18:20
Sauvin has quit [Remote host closed the connection]
18:25
bak1an has quit [Ping timeout: 246 seconds]
18:26
r29v has joined #ruby
18:29
f3ttX] has joined #ruby
18:41
reber has joined #ruby
18:43
reber has quit [Remote host closed the connection]
18:44
grvgr has joined #ruby
18:44
<
irightcode2 >
How do you import rake tasks from another Rakefile?
18:45
r29v has quit [Quit: r29v]
18:47
lxsameer has joined #ruby
18:52
NL3limin4t0r is now known as NL3limin4t0r_afk
18:54
Swyper has joined #ruby
18:55
sarink has joined #ruby
18:59
Swyper has quit [Ping timeout: 258 seconds]
19:01
conta has quit [Quit: conta]
19:02
ams__ has quit [Quit: Connection closed for inactivity]
19:04
am0123 has quit [Ping timeout: 246 seconds]
19:04
irightcode2 has quit [Ping timeout: 256 seconds]
19:08
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:09
bmurt has joined #ruby
19:09
[Butch] has joined #ruby
19:09
vikaton has joined #ruby
19:11
themsay has quit [Ping timeout: 258 seconds]
19:12
mikecmpbll has joined #ruby
19:19
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:22
reber has joined #ruby
19:23
orbyt_ has joined #ruby
19:24
SeepingN has joined #ruby
19:31
mostlybadfly has quit [Quit: Connection closed for inactivity]
19:47
lytol_ has joined #ruby
19:48
mikecmpbll has quit [Quit: inabit. zz.]
19:48
f3ttX] has quit [Quit: Lost terminal]
19:48
am0123 has joined #ruby
19:53
conta has joined #ruby
19:58
conta has quit [Ping timeout: 258 seconds]
19:59
connermcd has joined #ruby
20:00
polishdub has quit [Quit: leaving]
20:00
paraxial has joined #ruby
20:03
nickjj has quit [Read error: Connection reset by peer]
20:04
nickjj has joined #ruby
20:09
r29v has joined #ruby
20:21
AJA4350 has quit [Ping timeout: 268 seconds]
20:23
catbusters has quit [Quit: Connection closed for inactivity]
20:23
cd has joined #ruby
20:25
gix has joined #ruby
20:30
reber has quit [Remote host closed the connection]
20:34
am0123 has quit [Ping timeout: 258 seconds]
20:36
orbyt_ has quit [Ping timeout: 258 seconds]
20:36
AJA4350 has joined #ruby
20:40
ur5us has joined #ruby
20:41
connermcd has quit [Quit: WeeChat 2.3]
20:41
profetes has joined #ruby
20:52
connermcd has joined #ruby
20:53
nowhere_man has joined #ruby
21:01
sanscoeu_ has joined #ruby
21:03
themsay has joined #ruby
21:03
evdubs__ has joined #ruby
21:03
Dbugger has joined #ruby
21:04
sanscoeur has quit [Ping timeout: 240 seconds]
21:05
Iambchop_ has joined #ruby
21:05
timeless_ has joined #ruby
21:05
teej_ has joined #ruby
21:06
timeless has quit [Disconnected by services]
21:06
tdy3 has joined #ruby
21:06
quintasan has joined #ruby
21:06
beaky1 has joined #ruby
21:06
timeless_ is now known as timeless
21:07
nowhere_man has quit [Ping timeout: 252 seconds]
21:09
sarink has quit [Remote host closed the connection]
21:09
sarink has joined #ruby
21:11
creat has quit [Ping timeout: 268 seconds]
21:11
michael_mbp has quit [Ping timeout: 268 seconds]
21:11
teej has quit [Ping timeout: 268 seconds]
21:11
Iambchop has quit [Ping timeout: 268 seconds]
21:11
vqrs has quit [Ping timeout: 268 seconds]
21:11
evdubs_ has quit [Ping timeout: 268 seconds]
21:11
dbugger_ has quit [Ping timeout: 268 seconds]
21:11
beaky has quit [Ping timeout: 268 seconds]
21:11
Cybergeek has quit [Ping timeout: 268 seconds]
21:11
twe4ked has quit [Ping timeout: 268 seconds]
21:11
Iambchop_ is now known as Iambchop
21:11
teej_ is now known as teej
21:11
vqrs_ has joined #ruby
21:12
twe4ked has joined #ruby
21:13
cpallares has quit [Ping timeout: 246 seconds]
21:14
creat has joined #ruby
21:14
d^sh has quit [Ping timeout: 246 seconds]
21:14
ghormoon has quit [Ping timeout: 246 seconds]
21:15
themsay has quit [Ping timeout: 268 seconds]
21:16
themsay has joined #ruby
21:16
michael_mbp has joined #ruby
21:16
d^sh has joined #ruby
21:17
cpallares has joined #ruby
21:17
sanscoeu_ has quit [Remote host closed the connection]
21:18
tdy3 has quit [Ping timeout: 250 seconds]
21:18
sanscoeur has joined #ruby
21:19
ghormoon has joined #ruby
21:21
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
21:25
am0123 has joined #ruby
21:30
connermcd has quit [Quit: WeeChat 2.3]
21:31
themsay has quit [Ping timeout: 250 seconds]
21:31
zapata has quit [Ping timeout: 252 seconds]
21:34
zapata has joined #ruby
21:42
AJA4351 has joined #ruby
21:44
AJA4350 has quit [Ping timeout: 258 seconds]
21:44
AJA4351 is now known as AJA4350
21:45
hutch has quit [Ping timeout: 258 seconds]
21:54
r29v has quit [Quit: r29v]
21:59
hutch has joined #ruby
22:04
sanscoeur has quit [Remote host closed the connection]
22:06
uplime has quit [Remote host closed the connection]
22:11
dviola has joined #ruby
22:12
nowhere_man has joined #ruby
22:13
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
22:18
tdy3 has joined #ruby
22:21
lxsameer has quit [Ping timeout: 268 seconds]
22:22
muhairwe has joined #ruby
22:24
r29v has joined #ruby
22:28
xrexeon has quit [Remote host closed the connection]
22:29
sanscoeur has joined #ruby
22:30
muhairwe has quit []
22:39
orbyt_ has joined #ruby
22:44
uplime has joined #ruby
22:46
chouhoulis has joined #ruby
22:49
G has quit [Remote host closed the connection]
22:50
AJA4351 has joined #ruby
22:50
AJA4350 has quit [Ping timeout: 250 seconds]
22:50
AJA4351 is now known as AJA4350
22:57
tiff has joined #ruby
22:59
ziyadb has quit [Quit: Connection closed for inactivity]
23:03
am0123 has quit [Ping timeout: 250 seconds]
23:05
cybergeeek has joined #ruby
23:06
jabowa has joined #ruby
23:06
Nirvash has joined #ruby
23:07
ModusPwnens has joined #ruby
23:07
<
ModusPwnens >
I think i'm trying to do something strange with ruby. Is it valid to do nested inline rescue statements?
23:08
<
ruby[bot] >
ModusPwnens: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use
https://gist.github.com
23:08
<
Nirvash >
Is there a way to call a method in Ruby like so: (Class.new)->method ?
23:09
<
ModusPwnens >
Seems like you can only do one level of nested inline rescues?
23:10
<
Nirvash >
ModusPwnens — Is there a reason to use the rescues in that example?
23:10
<
leftylink >
more parens are needed
23:10
<
ModusPwnens >
i mean, no because it's contrived to be an example.
23:11
<
ModusPwnens >
oh wow, it was really just the parens.
23:11
mikecmpbll has joined #ruby
23:12
<
leftylink >
I had not thought to do that until it was just brought up, but it is interesting
23:12
<
ModusPwnens >
i hadn't thought to either. normally ruby is pretty smart about order of operations but i guess this time it needs help
23:13
<
ModusPwnens >
so does that mean the second rescue is just... not doing anything?
23:14
<
al2o3-cr >
jabowa: DateTime.parse('Mon, 14 Jan 2019 14:59:00 -0500').iso8601
23:14
<
leftylink >
okay so I played around with where the parens should go, this is interesting
23:14
<
uplime >
Nirvash: what would that syntax do?
23:15
<
uplime >
(Class.new)->method i mean
23:15
<
leftylink >
&>> ruby -e 'def rawr(num); raise "no" if num.even?; num end; test = rawr(2) rescue rawr(4) rescue rawr(5); test
23:15
<
Nirvash >
In other languages it would call that method
23:15
<
leftylink >
&>> ruby -e 'def rawr(num); raise "no" if num.even?; num end; test = (rawr(2) rescue rawr(4)) rescue rawr(5); test
23:15
<
havenwood >
ModusPwnens: Consider using an ArgumentError and interpolating: raise ArgumentError, "expected odd number but `#{num}' is even" if num.even?
23:15
<
Nirvash >
Is there a way to do that in Ruby without assigning the new class to a variable first?
23:15
hutch has quit [Ping timeout: 246 seconds]
23:15
<
uplime >
Nirvash: Wouldn't that just be Class.new.method in ruby then?
23:15
<
leftylink >
&>> ruby -e 'def rawr(num); raise "no" if num.even?; num end; test = rawr(2) rescue (rawr(4) rescue rawr(5)); test
23:16
<
uplime >
&>> Array.new.size
23:16
twobitsprite has quit [Ping timeout: 245 seconds]
23:16
<
Nirvash >
In Ruby it would be two steps: a = Class.new a.method
23:16
<
Nirvash >
I was hoping there was something like (Class.new)->method to condense it
23:16
<
ModusPwnens >
leftylink: looks like you have to do test = (rawr(2) rescue rawr(4)) rescue rawr(5)
23:16
<
al2o3-cr >
Class.new.method ?
23:17
<
Nirvash >
If that's possible, that would be perfect
23:17
<
havenwood >
Nirvash: you can chain methods of ^
23:17
<
ModusPwnens >
havenwood: this is a contrived example. my real code does something a bit different but still throws an exception with raise "..."
23:17
<
Nirvash >
Perfect! Thank you
23:19
<
havenwood >
ModusPwnens: Interpolation saves a String allocation, spares an explicit #to_s call, and avoids needing parens.
23:20
<
ModusPwnens >
havenwood: I tried using string interpolation and the issue with the nested rescues remains
23:20
hutch has joined #ruby
23:21
<
al2o3-cr >
leftylink: why are you using ruby -e?
23:21
<
leftylink >
oh no, that would be why
23:21
<
leftylink >
I pasted too much
23:21
<
leftylink >
no wonder that was all messed up
23:22
<
havenwood >
no-op program ^
23:22
<
ModusPwnens >
i'm not sure I follow :(. What do you mean by ruby obfuscation submission?
23:22
<
ModusPwnens >
oh i see. that's clever.
23:22
<
leftylink >
a submission to a ruby obfuscation contest
23:22
<
havenwood >
1st (Gold): "Most reserved" -- kinaba
23:23
<
havenwood >
I guess it's transcendental imbroglio, not obfuscation ¯\_(ツ)_/¯
23:24
<
al2o3-cr >
yusuke endoh is a god!
23:25
tdy3 is now known as tdy
23:25
<
al2o3-cr >
that quine with about god knows how many languages. just WOW!
23:26
<
phaul >
booring.. then it took an interesting turn :)
23:26
<
leftylink >
okay, now I'm ready
23:26
<
leftylink >
&>> def f(num); raise "no" if num.even?; num end; t1 = f(2) rescue f(4) rescue f(5); t2 = f2 rescue (f(4) rescue f(5)); t3 = (f(2) rescue f(4)) rescue f(5); (t4 = f(2) rescue f(4)) rescue f(5); p [t1, t2, t3, t4]
23:26
eddof13 has joined #ruby
23:26
<
leftylink >
so I'm forced to assume that t1 is parsed like t4
23:26
<
uplime >
havenwood: wow thats trippy
23:26
<
leftylink >
maybe there are some other possible parses that result in the same
23:29
* phaul
wanted to make that ^ pun last time it was on, but missed my chance
23:29
nfk has joined #ruby
23:30
eddof13 has quit [Ping timeout: 268 seconds]
23:31
<
ModusPwnens >
i'm moderately proficient in ruby but that seems a bit unexpected/unintuitive
23:32
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
23:32
<
phaul >
oh, al2o3-cr I was afk, when you asked. yes rubydoc has parslet
23:33
<
nfk >
ModusPwnens, and the standard answer is that it's supposed to be intuitive to matz
23:33
<
nfk >
been there, asked that
23:34
<
nfk >
or rather, been here; asked that
23:35
<
al2o3-cr >
phaul: yeah, i was just be nosey looking through your repo for rubydoc ;)
23:36
orbyt_ has joined #ruby
23:40
tdy has quit [Ping timeout: 268 seconds]
23:41
<
nfk >
are there good orm's for a single file script to access a basic db - sqlite would be neat but i can probably live with something much simpler
23:41
<
havenwood >
nfk: The Sequel gem is lovely
23:43
hutch has quit [Ping timeout: 272 seconds]
23:44
<
nfk >
havenwood, neat, looking at the example, looks pretty much what I had in mind. thanks
23:45
<
leftylink >
&ast>> t1 = f(2) rescue f(4) rescue f(5)
23:46
r29v has quit [Quit: r29v]
23:47
<
leftylink >
that is indeed an interesting parse
23:47
al2o3-cr has quit [Quit: WeeChat 2.3]
23:48
<
nfk >
wait, a rescue on function? is that legit?
23:49
ellcs has joined #ruby
23:51
al2o3-cr has joined #ruby
23:51
beaky1 has quit [Quit: WeebChat 2.0.1]
23:52
<
leftylink >
I would think it's equally valid (or not) as an other use of modifier-rescue
23:53
<
leftylink >
I do wonder about why one bound tighter than the = and the other didn't though
23:54
beaky has joined #ruby
23:58
jabowa has quit [Quit: Page closed]