about summary refs log tree commit diff stats
path: root/examples
Commit message (Expand)AuthorAgeFilesLines
* Guard tmux title changestoonn2018-01-301-1/+1
* rifle_sxiv.sh: be POSIX, single = for string eqDaniel Lublin2017-12-141-1/+1
* Add a :narrow keybind to rc_emacs.confWojciech Siewierski2017-05-211-0/+1
* config/rc.conf: Properly set `preview_script` by defaultnfnty2017-04-121-2/+2
* linting: pylint: Remove most `disabled=protected-access`nfnty2017-01-301-2/+2
* examples: Added plugin_fasd_add.pyTheo Laurent2017-01-291-0/+25
* Add setting `hostname_in_titlebar`nfnty2017-01-291-0/+3
* linting: pylint: Enable `broad-except`, Improve loggingnfnty2017-01-211-16/+13
* Python 3 division: Import `division` from `__future__`nfnty2017-01-218-8/+8
* linting: pylint 2.0.0nfnty2017-01-171-2/+1
* linting: Python 2 compat: Import from `__future__`nfnty2017-01-178-0/+17
* linting: Python 2 compatnfnty2017-01-172-6/+6
* linting: pylint and flake8nfnty2017-01-178-25/+46
* linting: autopep8nfnty2017-01-171-4/+10
* Merge branch 'automatic-cd-osx' of https://github.com/arshiamufti/rangerhut2016-11-041-0/+2
|\
| * Add correct path to ranger on OS XArshia Mufti2016-09-061-0/+2
* | Fix the urxvt preview documentationWojciech Siewierski2016-10-081-1/+1
* | Implement the urxvt-based image previewsWojciech Siewierski2016-10-051-0/+8
|/
* Fix misspellingsstepshal2016-06-261-1/+1
* Merge branch 'E301' of https://github.com/stepshal/rangerhut2016-06-182-0/+2
|\
| * Add one blank line where is expectedstepshal2016-06-162-0/+2
* | Add two blank lines where is expectedstepshal2016-06-167-0/+12
|/
* doc/tools/print_colors.py: remove trailing newlinestepshal2016-06-071-1/+0
* examples/plugin_new_macro.py: fix spaceshut2016-06-021-3/+3
* fixed key binding for new tabs in in the source language and x86 machine code. Zero runtime. => Programmers have to decide how to use registers. => Translator can't insert any instructions that write to registers. (We don't know if a register is in use.) == Lessons from Mu 1. For easy bounds checking, never advance pointers to arrays or heap allocations. No pointer arithmetic. 2. Store the array length with the array. 3. Store an allocation id with heap allocations. Allocation id goes monotonically up, never gets reused. When it wraps around to zero the program panics. 4. Heap pointers also carry around allocation id. 5. When dereferencing a heap pointer, first ensure its alloc id matches the alloc id of the payload. This ensures some other copy of the pointer didn't get freed (and potentially reused) == Problem 1 How to index into an array? The array has a length that needs to be checked. Its elements have a type T. The base will be in memory, either on the stack or the heap. The index may be in the register, stack or heap. That's too much work to do in a single instruction. So arrays have to take multiple steps. And we have to guard against the steps being misused in unsafe ways. To index into an array with elements of type T, starting with the size of the array in bytes: step 1: get the offset the index is at <reg offset> : (index T) <- index <reg/mem idx> : int, <literal> : (size T) step 2: convert the array to address-of-element <reg x> : (address T) <- advance <reg/mem A> : (array T), <reg offset> : (index T) implicitly compares the offset with the size, panic if greater => compare <reg offset> : (index T), <reg/mem> : (array T) jge panic step 3: use the address to the element ... (index T) is a special type. You can do only two things with it: - pass it to the advance instruction - convert it to a number (but no converting back) (address T) is a short-term pointer. You can't store addresses in structs, you can't define global variables of that type, and you can't pass the type to the memory allocator to save to the heap. You also can't store addresses in the stack, because you may encounter a free before you end the function. Maybe we'll also forbid any sort of copy of address types. Only place you can store an (address T) is the register you saved to. To copy you need a handle to a heap allocation. Still not entirely protected against temporal issues. But pretty close. == Problem 2 How to dereference a heap allocation? == List of types int char (address _) X (array _) (handle _) n>/+1
* Replaced file.basename with file.relative_path where appropriate.Wojciech Siewierski2015-05-082-3/+3
* added examples/rc_emacs.confhut2015-05-041-0/+533
* added example plugin that adds a linemodehut2015-04-191-0/+16
* Should I dual ranger/cleric or wait for the THAC0 bonus? v1.7.0hut2015-04-1410-10/+10
* moved "doc/examples" to "examples" for more visibilityhut2015-04-1311-0/+221
* move examples to doc/exampleshut2013-03-0911-200/+0
* examples/rifle_sxiv: fix rifle_sxiv with chars like []hut2013-03-091-1/+1
* Fixed the sxiv workaround to handle spaces and be more POSIX compliant.Pierre Neidhardt2013-03-051-7/+21
* Added version info to exampleshut2013-03-0111-0/+22
* use 4-space-indents in files that had 2-space-indentshut2013-02-221-5/+5
* core.main: added RANGER_LOAD_DEFAULT_RC environment variablehut2013-02-221-9/+0
* examples/plugin_chmod_keybindings.py: fixed crashhut2013-02-221-1/+1
* examples/rifle_sxiv.sh: removed realpath dependencyhut2013-02-181-1/+8
* examples/rifle_sxiv.sh: remove bash dependencyhut2013-02-181-1/+1
* fsobject.directory.accept_file: pass directory, not dirnamehut2013-02-151-3/+3
* examples/README: add instructions on how to install pluginshut2013-02-131-0/+3
* removed all trailing whitespaceshut2013-02-101-1/+1
* replaced tabs with 4 spaces in all python fileshut2013-02-101-7/+7
* added examples/rifle_different_file_opener.confhut2012-12-041-0/+7