Created
February 12, 2009 20:51
-
-
Save samaaron/62864 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| naeu_: does anyone in here feel up for explaining the difference between lexical scopes and bindings? | |
| [21:46] naeu_: i.e. how this works: x = 1; proc { y = 2; proc { puts [x,y] }} | |
| [21:47] headius: lopex: I wish there were more specs for 1.9 | |
| [21:47] headius: naeu_: a binding aggregates a lexical scope and some other stuff | |
| [21:47] headius: a proc is essentially a captured binding plus a block of code | |
| [21:47] headius: lexical scope is simply a hierarchy of variable scopes and some other stuff | |
| [21:48] naeu_: so the code snippet i wrote just now is an example of a two-tiered hierarchy of variable scopes? | |
| [21:48] headius: that's right | |
| [21:48] david_koontz: headius: any ideas on the stack out of memory error I posted earlier? | |
| [21:48] headius: well, three actually | |
| [21:48] headius: there's an outer scope around the first proc | |
| [21:48] headius: variable scopes only go as high as the neared method or class body | |
| [21:48] naeu_: and there are constructs which explicitly define where those scopes start and stop such as method and class definitions? | |
| [21:49] headius: see, you understand it already | |
| [21:49] david_koontz: getting " Your application used more stack memory than the safety cap." even when setting -Xss1000k | |
| [21:49] headius: david_koontz: didn't see it, repaste? sounds like a bug fo' sho' | |
| [21:49] naeu_: i'm at that really bad phase where i understand quite a bit, but that makes it worse | |
| [21:49] david_koontz: !pastie |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment