00:16
hansolo has quit [Ping timeout: 252 seconds]
00:53
hansolo has joined #ruby
01:06
moldorcoder7 has quit [Ping timeout: 252 seconds]
01:07
moldorcoder7 has joined #ruby
01:07
caedmon has quit [Ping timeout: 268 seconds]
01:08
caedmon has joined #ruby
01:17
caedmon has quit [Quit: caedmon]
01:17
RougeR has quit [Ping timeout: 272 seconds]
01:19
caedmon has joined #ruby
01:21
cryptkeeper has joined #ruby
01:41
cartdrige has joined #ruby
01:43
caedmon has quit [Ping timeout: 268 seconds]
02:18
crax23 has joined #ruby
02:21
cartdrige has quit [Ping timeout: 260 seconds]
02:22
ur5us__ has joined #ruby
02:24
ur5us_ has quit [Ping timeout: 252 seconds]
02:26
caedmon has joined #ruby
02:39
FullMetalStacker has joined #ruby
02:39
FullMetalStacker has quit [Client Quit]
02:46
caedmon has quit [Ping timeout: 268 seconds]
02:53
agent_white has joined #ruby
02:54
caedmon has joined #ruby
02:54
caedmon has quit [Client Quit]
02:56
caedmon has joined #ruby
03:03
desnudopenguino1 has joined #ruby
03:04
desnudopenguino has quit [Ping timeout: 252 seconds]
03:04
desnudopenguino1 is now known as desnudopenguino
03:10
ur5us__ has quit [Ping timeout: 256 seconds]
03:19
ur5us__ has joined #ruby
03:22
desnudopenguino1 has joined #ruby
03:22
desnudopenguino has quit [Ping timeout: 255 seconds]
03:22
desnudopenguino1 is now known as desnudopenguino
03:22
caedmon has quit [Ping timeout: 272 seconds]
03:40
stirl has quit [Ping timeout: 255 seconds]
03:40
m_antis has quit [Ping timeout: 260 seconds]
03:41
m_antis has joined #ruby
04:57
ur5us__ has quit [Ping timeout: 260 seconds]
04:58
Linux_Kerio has joined #ruby
05:05
TomyLobo has quit [Read error: Connection reset by peer]
05:06
polishdub has quit [Ping timeout: 260 seconds]
05:39
otisolsen70 has joined #ruby
05:40
otisolsen70 has quit [Remote host closed the connection]
05:42
otisolsen70 has joined #ruby
05:53
agent_white has quit [Quit: later]
05:57
ur5us__ has joined #ruby
06:26
reset has quit [Quit: reset]
07:09
ur5us__ has quit [Ping timeout: 246 seconds]
07:23
moldorcoder7 has quit [Ping timeout: 252 seconds]
07:30
teclator has joined #ruby
08:11
tomtmym has joined #ruby
08:11
tomtmym has quit [Changing host]
08:11
tomtmym has joined #ruby
08:24
Rounin has joined #ruby
08:24
Rounin has quit [Changing host]
08:24
Rounin has joined #ruby
08:28
willfish has joined #ruby
09:02
jvalleroy has joined #ruby
09:13
ur5us__ has joined #ruby
09:51
Linux_Kerio has quit [Ping timeout: 260 seconds]
09:55
pip[m] has joined #ruby
09:55
pip[m] has left #ruby [#ruby]
10:18
ur5us__ has quit [Ping timeout: 246 seconds]
10:43
cryptkeeper has quit [Quit: Connection closed for inactivity]
11:02
cyj123 has quit [Quit: Connection closed for inactivity]
11:19
FullMetalStacker has joined #ruby
11:24
FullMetalStacker has quit [Remote host closed the connection]
11:34
FullMetalStacker has joined #ruby
11:34
FullMetalStacker has quit [Client Quit]
11:43
darkstardevx has quit [Read error: Connection reset by peer]
11:48
rvalue has quit [Read error: Connection reset by peer]
11:48
rvalue has joined #ruby
11:59
Sankalp has quit [Ping timeout: 268 seconds]
12:01
crax23 has quit [Ping timeout: 260 seconds]
12:02
Linux_Kerio has joined #ruby
12:08
weaksauce has quit [Ping timeout: 260 seconds]
12:08
Sankalp has joined #ruby
12:15
Sankalp has quit [Ping timeout: 252 seconds]
12:17
work has joined #ruby
12:17
weaksauce has joined #ruby
12:27
Sankalp has joined #ruby
14:47
graywolf has joined #ruby
14:53
moldorcoder7 has joined #ruby
14:54
budo has joined #ruby
15:02
crankharder has joined #ruby
15:03
polishdub has joined #ruby
15:03
<
crankharder >
what's the technical terms for this pattern: "if false ; my_var = 123 ; end ; my_var" and why does it not blow up with NameError ?
15:07
Pixi has joined #ruby
15:08
donofrio_ has quit [Remote host closed the connection]
15:10
Pixi__ has quit [Ping timeout: 252 seconds]
15:25
joto has quit [Ping timeout: 272 seconds]
15:26
desnudopenguino has quit [Ping timeout: 260 seconds]
15:26
desnudopenguino has joined #ruby
15:35
<
havenwood >
crankharder: An unused local variable is still set in the local table when the code is compiled to intermediary representation.
15:39
<
havenwood >
>> RubyVM::InstructionSequence.compile('meaning = 42 if false').to_a[4]
15:39
<
ruby[bot] >
havenwood: # => {:arg_size=>0, :local_size=>1, :stack_max=>1, :node_id=>4, :code_location=>[1, 0, 1, 21]} (
https://carc.in/#/r/e9ox )
15:40
<
havenwood >
That one local variable gets set on the local table even though it's never assigned.
15:42
<
havenwood >
crankharder: It's not a pattern I'd follow, more of just a happenstance.
15:46
mollerup has quit [Remote host closed the connection]
15:47
mollerup has joined #ruby
15:51
desnudopenguino1 has joined #ruby
15:52
desnudopenguino has quit [Ping timeout: 255 seconds]
15:52
desnudopenguino1 is now known as desnudopenguino
15:52
budo has quit [Ping timeout: 272 seconds]
16:05
<
crankharder >
agree it's a weird pattern ; thanks for the explanation!
16:06
stirl has joined #ruby
16:13
<
ox1eef_ >
In other words, all locals are assigned a value of nil at compile time.
16:15
agent_white has joined #ruby
16:21
Pixi has quit [Quit: Leaving]
16:26
Pixi has joined #ruby
16:26
graywolf has quit [Quit: WeeChat 3.5]
16:28
FullMetalStacker has joined #ruby
16:29
FullMetalStacker has quit [Client Quit]
16:32
havenwood has joined #ruby
16:33
havenwood has quit [Client Quit]
16:34
havenwood has joined #ruby
17:07
_ht has joined #ruby
17:08
<
adam12 >
crankharder: variable hoisting maybe?
17:09
<
adam12 >
I'm not sure it's technically true but it is kind of similar.
17:11
<
ox1eef_ >
Yeah, it is a bit similar but just lacks the block. if (foo) { var x = 1 } would hoist x to the nearest function in JS, but in Ruby if doesn't have a block.
17:11
willfish has quit [Ping timeout: 268 seconds]
17:12
<
ox1eef_ >
The behavior of locals in Ruby is a bit surprising when you analyze it.
17:13
<
ox1eef_ >
I guess the same could be said for instance variables, where you can reference them without them being defined. When you think about that, you might say it's a bad idea but in practice it's usually a good thing.
17:20
Milos has quit [Ping timeout: 252 seconds]
17:26
work has quit [Quit: Connection closed for inactivity]
17:29
Pixi has quit [Ping timeout: 268 seconds]
17:40
cartdrige has joined #ruby
17:42
Milos has joined #ruby
17:44
Pixi has joined #ruby
18:11
cryptkeeper has joined #ruby
18:31
caleb has joined #ruby
19:02
crax23 has joined #ruby
19:05
cartdrige has quit [Ping timeout: 252 seconds]
19:07
crax23 has quit [Ping timeout: 256 seconds]
19:14
crankharder has quit [Ping timeout: 272 seconds]
19:19
crankharder has joined #ruby
19:46
stirl has quit [Ping timeout: 246 seconds]
20:08
reset has joined #ruby
20:15
<
adam12 >
This has to be an optimization.
20:18
<
caleb >
does jeremy hang out anywhere online to ask besides an issue?
20:34
<
adam12 >
caleb: He used to be on IRC but with the split he moved on.
20:34
<
adam12 >
weaksauce: Aha. Nice find.
20:40
ur5us__ has joined #ruby
20:45
jidar has quit [Remote host closed the connection]
20:55
<
ox1eef_ >
caleb: The best way to get in touch is probably mailing lists / google groups.
20:55
<
ox1eef_ >
Those, and IRC are my bread and butter.
21:03
Linux_Kerio has quit [Ping timeout: 272 seconds]
21:07
_ht has quit [Quit: _ht]
21:32
Aminda has quit [Remote host closed the connection]
21:32
Aminda has joined #ruby
21:40
otisolsen70 has quit [Quit: Leaving]
22:14
crankharder has quit [Ping timeout: 272 seconds]
22:15
sagax has quit [Ping timeout: 260 seconds]
22:25
agent_white has quit [Quit: bbl]
22:52
tomtmym has quit [Quit: Gone.]
22:53
cartdrige has joined #ruby
22:57
polishdub has quit [Ping timeout: 252 seconds]
22:59
polishdub has joined #ruby
23:00
ruby[bot] has quit [Remote host closed the connection]
23:00
ruby[bot] has joined #ruby
23:02
polishdub has quit [Remote host closed the connection]
23:10
phenom has quit [Ping timeout: 268 seconds]
23:10
phenom_ has joined #ruby
23:44
crankharder has joined #ruby
23:48
crankharder has quit [Ping timeout: 252 seconds]