Skip to content

Instantly share code, notes, and snippets.

@datagrok
Last active September 18, 2015 15:52
Show Gist options
  • Save datagrok/248149407d29e5843cec to your computer and use it in GitHub Desktop.
Save datagrok/248149407d29e5843cec to your computer and use it in GitHub Desktop.

Revisions

  1. datagrok revised this gist Sep 18, 2015. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions noob-questions.md
    Original file line number Diff line number Diff line change
    @@ -2,13 +2,13 @@

    ## \_\_debug\_\_ vs. -O

    Python has a built-in variable __debug__ which is set to True when python is called without -O (optimize). The -O flag disables all assertion code.
    Python has a built-in variable \_\_debug\_\_ which is set to True when python is called without -O (optimize). The -O flag disables all assertion code.

    This seems at first glance like a very easy and clean construct to rely on when coding in development versus production: in development, don't use -O, defensively litter your code with type- and sanity-checking asserts. Perform development-only debugging by testing __debug__ beforehand.
    This seems at first glance like a very easy and clean construct to rely on when coding in development versus production: in development, don't use -O, defensively litter your code with type- and sanity-checking asserts. Perform development-only debugging by testing \_\_debug\_\_ beforehand.

    When in production, run all code is run with -O which disables asserts (speeding execution) and sets __debug__ to False.
    When in production, run all code is run with -O which disables asserts (speeding execution) and sets \_\_debug\_\_ to False.

    Why is this construct not more popular? Why does nearly large-ish collection of python code re-invent a DEBUG global variable or the like and ignore __debug__?
    Why is this construct not more popular? Why does nearly large-ish collection of python code re-invent a DEBUG global variable or the like and ignore \_\_debug\_\_?

    # Scheme

  2. datagrok revised this gist Sep 18, 2015. 1 changed file with 16 additions and 0 deletions.
    16 changes: 16 additions & 0 deletions noob-questions.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,23 @@
    # Python

    ## \_\_debug\_\_ vs. -O

    Python has a built-in variable __debug__ which is set to True when python is called without -O (optimize). The -O flag disables all assertion code.

    This seems at first glance like a very easy and clean construct to rely on when coding in development versus production: in development, don't use -O, defensively litter your code with type- and sanity-checking asserts. Perform development-only debugging by testing __debug__ beforehand.

    When in production, run all code is run with -O which disables asserts (speeding execution) and sets __debug__ to False.

    Why is this construct not more popular? Why does nearly large-ish collection of python code re-invent a DEBUG global variable or the like and ignore __debug__?

    # Scheme

    Reading http://en.wikipedia.org/wiki/Scheme_(programming_language)

    - Why the necessity for `let`, `let*`, and `letrec`? It seems like `let*` would do everything that `let` can do; and `letrec` can do everything `let*` can do. If it is a matter of performance (is `let` simpler and faster than `letrec`?) then could a clever interpreter determine which of the three was appropriate for any given set of definitions?

    # Smalltalk

    Reading http://blog.moryton.net/2007/12/computer-revolution-hasnt-happened-yet.html

    - Can the "big wins" from smalltalk exist separately from some of its unusual features like
  3. datagrok revised this gist Jun 30, 2014. 1 changed file with 9 additions and 5 deletions.
    14 changes: 9 additions & 5 deletions noob-questions.md
    Original file line number Diff line number Diff line change
    @@ -7,11 +7,15 @@ Reading http://blog.moryton.net/2007/12/computer-revolution-hasnt-happened-yet.h
    - Can the "big wins" from smalltalk exist separately from some of its unusual features like
    - [image-based persistence][]
    - a built-in graphics environment with (non-tiling) window manager, (crappy) code editor, and (interesting) code browser?
    - (yes, because some lisps have this image-based computing idea, and some do not?)
    - How does one test, package & distribute small units of smalltalk code?
    - Doesn't a crash run the risk of massive loss of state? (read up about image-based persistence)
    - Smalltalk graphical environment running on its vm as desktop environment? As operating system?
    - Despite it being decades old, the whizzy features of being able to rotate and dissect UI elements in real-time are slow. Can Smalltalk VM take advantage of OpenGL?
    - (yes, because some lisps have this image-based computing idea, and some do not?)
    - Examine http://stackoverflow.com/questions/722204/which-programming-languages-besides-smalltalk-are-image-based
    - Specifically about [image-based persistence][]:
    - Doesn't a crash run the risk of massive loss of state? (read up about image-based persistence)
    - Doesn't the assumption of modifying the code on a long-running vm risk corrupting the state? How does one rollback/recover?
    - Examine http://stackoverflow.com/questions/722204/which-programming-languages-besides-smalltalk-are-image-based
    - Long-running stateful seems more vulnerable to memory leak issues and less compatible with "ephemeral" virtual hosting. False?
    - Specifically about SmallTalk's (Squeak's?) built-in graphical development environment:
    - Graphical development environment as desktop environment? As operating system?
    - The whizzy features of being able to interact with rotated UI elements in real-time feels slow. Can the VM take advantage of accelerated graphics libraries like OpenGL?

    [image-based persistence]: http://en.wikipedia.org/wiki/Smalltalk#Image-based_persistence
  4. datagrok revised this gist Jun 30, 2014. 1 changed file with 9 additions and 5 deletions.
    14 changes: 9 additions & 5 deletions noob-questions.md
    Original file line number Diff line number Diff line change
    @@ -4,10 +4,14 @@ Reading http://en.wikipedia.org/wiki/Scheme_(programming_language)

    Reading http://blog.moryton.net/2007/12/computer-revolution-hasnt-happened-yet.html

    - Can the "big ideas" about smalltalk be separated and provide advantages separately from some of its other features like
    - developing-everything-in-a-mutable-image
    - graphics environment with (non-tiling) window manager, (crappy) code editor, and (interesting) code browser?
    - How does one package & distribute small units of smalltalk code?
    - Can the "big wins" from smalltalk exist separately from some of its unusual features like
    - [image-based persistence][]
    - a built-in graphics environment with (non-tiling) window manager, (crappy) code editor, and (interesting) code browser?
    - How does one test, package & distribute small units of smalltalk code?
    - Doesn't a crash run the risk of massive loss of state? (read up about image-based persistence)
    - Smalltalk graphical environment running on its vm as desktop environment? As operating system?
    - Despite it being decades old, the whizzy features of being able to rotate and dissect UI elements in real-time are slow. Can Smalltalk VM take advantage of OpenGL?
    - (yes, because some lisps have this image-based computing idea, and some do not?)
    - (yes, because some lisps have this image-based computing idea, and some do not?)
    - Examine http://stackoverflow.com/questions/722204/which-programming-languages-besides-smalltalk-are-image-based

    [image-based persistence]: http://en.wikipedia.org/wiki/Smalltalk#Image-based_persistence
  5. datagrok revised this gist Jun 30, 2014. 1 changed file with 11 additions and 1 deletion.
    12 changes: 11 additions & 1 deletion noob-questions.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,13 @@
    Reading http://en.wikipedia.org/wiki/Scheme_(programming_language)

    - Why the necessity for `let`, `let*`, and `letrec`? It seems like `let*` would do everything that `let` can do; and `letrec` can do everything `let*` can do. If it is a matter of performance (is `let` simpler and faster than `letrec`?) then could a clever interpreter determine which of the three was appropriate for any given set of definitions?
    - Why the necessity for `let`, `let*`, and `letrec`? It seems like `let*` would do everything that `let` can do; and `letrec` can do everything `let*` can do. If it is a matter of performance (is `let` simpler and faster than `letrec`?) then could a clever interpreter determine which of the three was appropriate for any given set of definitions?

    Reading http://blog.moryton.net/2007/12/computer-revolution-hasnt-happened-yet.html

    - Can the "big ideas" about smalltalk be separated and provide advantages separately from some of its other features like
    - developing-everything-in-a-mutable-image
    - graphics environment with (non-tiling) window manager, (crappy) code editor, and (interesting) code browser?
    - How does one package & distribute small units of smalltalk code?
    - Smalltalk graphical environment running on its vm as desktop environment? As operating system?
    - Despite it being decades old, the whizzy features of being able to rotate and dissect UI elements in real-time are slow. Can Smalltalk VM take advantage of OpenGL?
    - (yes, because some lisps have this image-based computing idea, and some do not?)
  6. datagrok created this gist Jun 1, 2014.
    3 changes: 3 additions & 0 deletions noob-questions.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    Reading http://en.wikipedia.org/wiki/Scheme_(programming_language)

    - Why the necessity for `let`, `let*`, and `letrec`? It seems like `let*` would do everything that `let` can do; and `letrec` can do everything `let*` can do. If it is a matter of performance (is `let` simpler and faster than `letrec`?) then could a clever interpreter determine which of the three was appropriate for any given set of definitions?