about summary refs log tree commit diff stats
path: root/edit/005-sandbox.mu
Commit message (Collapse)AuthorAgeFilesLines
* 4262 - literal 'null'Kartik Agaram2018-06-171-12/+12
|
* 4261 - start using literals for 'true' and 'false'Kartik Agaram2018-06-171-1/+1
| | | | | | | | | They uncovered one bug: in edit/003-shortcuts.mu <scroll-down> was returning 0 for an address in one place where I thought it was returning 0 for a boolean. Now we've eliminated this bad interaction between tangling and punning literals.
* 4206 - edit/ app: consistent cursor positioningKartik K. Agaram2018-02-151-2/+0
|
* 4134 - 'input' = 'ingredient'Kartik K. Agaram2017-12-031-15/+15
|
* 3982 - bugfix: clear old recipe errors on F4Kartik K. Agaram2017-08-221-0/+1
| | | | | | This regression was introduced by commit 3902 in June. Making this commit clean took the last 4 commits of reorganizing.
* 3981Kartik K. Agaram2017-08-221-5/+1
| | | | | It's always been ugly that I referred to a later layer/feature in a label name.
* 3980Kartik K. Agaram2017-08-221-2/+2
|
* 3979Kartik K. Agaram2017-08-221-4/+4
|
* 3959Kartik K. Agaram2017-06-251-2/+13
| | | | | | | Don't unnecessarily write sandboxes to disk on F4. This seems to save almost 20% time when processing a large lesson directory with 36 sandboxes.
* 3958Kartik K. Agaram2017-06-251-4/+10
| | | | | | | | Improvement on fix 3957: rather than put a band-aid over a slow operation, eliminate the slowdown entirely. In this case it turns out we're unnecessarily saving files to disk when they could never be modified. Are we doing this on F4 as well?!
* 3955Kartik K. Agaram2017-06-251-36/+0
| | | | | Move a scenario which is after commit 3954 applicable to both editors, not just the recipe side.
* 3954Kartik K. Agaram2017-06-251-54/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | As a blanket rule, down-arrow now stops scrolling once the bottom margin comes on screen. Now that we have page-wise scrolling with ctrl-f/b and line-wise scrolling with ctrl-s/x, we don't need to conflate scroll positioning with the arrow keys. And as a result, early students no longer have to struggle with accidentally scrolling part of the sandbox off the screen when there's tons of empty space available. `move-to-next-line` is still super messy and will need further rethinking, but this commit simplifies the codebase as a whole by eliminating a couple of historical accidents: a) We only introduced scrolling past the bottom of the screen to allow more sandboxes to come into view before we had scrolling for the sandbox side. b) We undid scrolling past the bottom in just the recipe side to allow errors to come into view. Since these historical details are now irrelevant, we no longer need separate logic for the recipe and sandbox sides, and we don't need to keep track of the recipe-bottom separate from the bottom margin of arbitrary editors.
* 3946Kartik K. Agaram2017-06-231-3/+3
| | | | Fix the failing scenario of commit 3944.
* 3944Kartik K. Agaram2017-06-231-1/+25
| | | | | | | Reintroduce the failing test of commit 3938. It has two problems: a) it's failing, and b) it's not failing the same way as with a real screen.
* 3943Kartik K. Agaram2017-06-231-33/+0
| | | | Undo commit 3938 and almost everything after. Let's do this right.
* 3942Kartik K. Agaram2017-06-231-5/+5
| | | | | | | | No, my conclusion in the previous commit was wrong. When you print a character on the right margin, the cursor coordinates always wrap around to the left margin on the next row. It's just that if you're at the bottom of the screen, scrolling gives the impression that the row didn't change.
* 3941Kartik K. Agaram2017-06-231-13/+16
| | | | | | | | | | | | | | | | | Even though the bug of commit 3938 is now fixed, I'm still trying to track down why the failure looked different on the fake screen than on the real one. Snapshot as I try to track down the difference. One key lesson is that the approach of commit 3860 -- updating the cursor before rather than after printing each character -- turns out to be untenable. A sequence of `print` followed by `cursor-position` needs to behave the same as the real screen. But it's still not clear how the real screen. When you get to the end of a line the cursor position wraps after print to the left margin (column 0) on the next row. When you get to the bottom right the cursor position wraps to the *bottom left* margin. How the heck does it know to scroll on the next print, then? Is there some hidden state in the terminal?
* 3940Kartik K. Agaram2017-06-221-1/+1
|
* 3939Kartik K. Agaram2017-06-221-0/+3
|
* 3938Kartik K. Agaram2017-06-221-2/+32
| | | | | | | Fix an out-of-bounds write to the screen when sandboxes aligned just right. Thanks Ella Couch for reporting this issue.
* 3935Kartik K. Agaram2017-06-221-1/+1
|
* 3922Kartik K. Agaram2017-06-171-3/+2
|
* 3921Kartik K. Agaram2017-06-161-1/+1
|
* 3902 - drop redundant redraw of recipe side on F4Kartik K. Agaram2017-06-091-2/+15
| | | | | | This change is interesting because I only updated one test to gain confidence that F4 will never redraw the recipe side. (Most of the changes are to explicitly render-all before each scenario.)
* 3881 - allow students to turn sandboxes into recipesKartik K. Agaram2017-05-271-36/+40
| | | | Thanks Juan Crispin Hernandez for the suggestion.
* 3871Kartik K. Agaram2017-05-201-6/+0
| | | | | | | | Strange race condition: if I repeatedly press <enter> and <backspace> so the screen is constantly playing catch up, it will sometimes fail these assertions when it does eventually catch up. Somehow the cursor ends up misplaced. Let's just take them out. It's likely some low-level implementation detail of the terminal.
* 3869Kartik K. Agaram2017-05-191-65/+1
| | | | Clean up a few superficial things in Caleb's commit.
* 3865Kartik K. Agaram2017-05-191-1/+0
|
* 3861 - screen untouched when entering console modeKartik K. Agaram2017-05-181-0/+1
|
* 3860 - stop buffering the screen in termboxKartik K. Agaram2017-05-181-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To achieve this we have to switch to a model of the screen in termbox that is closer to the underlying terminal. Before: a screen is a grid of characters writing out of bounds does nothing After: a screen is a scrolling raster of characters writing out of bounds wraps to next line and scrolls if necessary To move to the new model, it was essential that I migrate my fake screen at the same time to mimic it. This is why the first attempt (commit 3824) failed (commit 3858). This is also why this commit can't be split into smaller pieces. The fake screen now 'scrolls' by rotating screen lines from top to bottom. There's still no notion of a scrollback buffer. The newer model is richer; it permits repl-like apps that upstream termbox can't do easily. It also permits us to simply use `printf` or `cout` to write to the screen, and everything mostly works as you would expect. Exceptions: a) '\n' won't do what you expect. You need to explicitly print both '\n' and '\r'. b) backspace won't do what you expect. It only moves the cursor back, without erasing the previous character. It does not wrap. Both behaviors exactly mimic my existing terminal's emulation of vt100. The catch: it's easy to accidentally scroll in apps. Out-of-bounds prints didn't matter before, but they're bugs now. To help track them down, use the `save-top-idx`, `assert-no-scroll` pair of helpers. An important trick is to wrap the cursor before rather after printing a character. Otherwise we end up scrolling every time we print to the bottom-right character. This means that the cursor position can be invalid at the start of a print, and we need to handle that. In the process we also lose the ability to hide and show the screen. We have to show the prints happening. Seems apt for a "white-box" platform like Mu.
* 3854Kartik K. Agaram2017-05-131-21/+6
| | | | Revert commits 3824, 3850 and 3852. We'll redo them more carefully.
* 3850Kartik K. Agaram2017-05-101-2/+21
| | | | | Bugfix: writes out of bounds used to be skipped, but started clobbering the screen on commit 3824.
* 3843Kartik K. Agaram2017-05-061-3/+5
|
* 3831Kartik K. Agaram2017-04-181-1/+1
| | | | Fix CI.
* 3824 - experiment: stop buffering in termboxKartik K. Agaram2017-04-161-4/+0
| | | | | | | | | | | | | | | | Now it's much more apparent why things are slow. You can see each repaint happening. Already I fixed one performance bug -- in clear-rest-of-screen. Since this subverts Mu's fake screen there may be bugs. Another salubrious side effect: I've finally internalized that switching to raw mode doesn't have to clear the screen. That was just an artifact of how termbox abstracted operations. Now I can conceive of using termbox to build a repl as well. (I was inspired to poke into termbox internals by http://viewsourcecode.org/snaptoken/kilo and https://github.com/antirez/linenoise)
* 3796Kartik K. Agaram2017-03-141-26/+45
| | | | | | Standardize the order of some common blocks in `render`, `render-text` and `render-code`. This is preparation for trying to reorganize them to reduce duplicate code.
* 3794Kartik K. Agaram2017-03-141-2/+2
| | | | Fix a _very_ misleading comment.
* 3793Kartik K. Agaram2017-03-141-0/+63
| | | | | | Move 'render-code' to the layer where it's used. Thanks Caleb Couch for finding this bit of ugliness.
* 3790Kartik K. Agaram2017-03-121-1/+4
| | | | Don't try to snapshot in scenarios.
* 3789Kartik K. Agaram2017-03-121-1/+3
| | | | | | | | | | | | | I accidentally got rid of git snapshotting of lessons back when I switched to testable file primitives last December (commit 3705). >:-( Bringing it back now, hopefully better. The improvement is that there's now at most one commit every time we hit F4. This change adds yet another reason that running `mu` from a different directory is just not supported.
* 3748Kartik K. Agaram2017-02-281-1/+1
|
* 3745Kartik K. Agaram2017-02-071-0/+1213
| | | | | | | Stop trying to create a new layer showing how we minimize prints. Stephen's suggestion is to create a data structure that encapsulates instructions to `insert-at-cursor` for either just printing a character to screen or rendering everything. Let's try that at some point.
* 3738 - start on new edit/ layer: minimizing printsKartik K. Agaram2017-02-041-1213/+0
|
* 3735 - get rid of 'print-integer'Kartik K. Agaram2017-01-221-2/+2
| | | | | We do support printing non-integer numbers for some time, albeit using the underlying host platform.
* 3705 - switch to tested file-system primitivesKartik K. Agaram2016-12-111-73/+97
|
* 3696Kartik K. Agaram2016-11-271-1/+1
| | | | | | Decouple editor initialization from rendering to screen. This hugely simplifies the header of 'new-editor' and makes clear that it was only using the screen for rendering.
* 3687Kartik K. Agaram2016-11-251-1/+1
|
* 3686Kartik K. Agaram2016-11-251-4/+4
|
* 3561Kartik K. Agaram2016-10-221-1/+1
|
* 3552Kartik K. Agaram2016-10-221-9/+9
| | | | | | | | | | | | | | | | | | Stop requiring jump instructions to explicitly provide a ':label' type for jump targets. This has been a source of repeated confusion for my students: a) They'd add the ':label' to the label definition rather than the jump target (label use) b) They'd spend time thinking about whether the initial '+' prefix was part of the label name. In the process I cleaned up a couple of things: - the space of names is more cleanly partitioned into labels and non-labels (clarifying that '_' and '-' are non-label prefixes) - you can't use label names as regular variables anymore - you can infer the type of a label just from its name
4cb0b11ba1931f01b6f337'>3e06ede ^
4bb89e2 ^




3e06ede ^
5ef6ef1 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
                     
        
                             
            
      

               
      
                                                                            

                                                                             
  
                                                                              



                                                                            
  


                                                                            
  
      


                                                                               
  

                                                                  
                                                                              
           

      
                                                          
         

              

                                              
   

                                                





                                       
   
          


                                                       











                                      
                     
   


                    
   
           
          
            
   
                 
              
            
   








              

                
            
   
                    
     

          
            
   
                            




               



               






                    
   
              

                     
   
         


                         
                      


                           
   


               
                  
   
               
            
         


              
   




               


            
   
               
              
         


              

                 

                                                                        
           
                          
              




                                                  
         

             
.TH DWM 1 dwm-VERSION
.SH NAME
dwm \- dynamic window manager
.SH SYNOPSIS
.B dwm
.RB [ \-v ]
.SH DESCRIPTION
.B dwm
is a dynamic window manager for X. It manages windows in tiling and floating
modes. Either mode can be applied dynamically, optimizing the environment for
the application in use and the task performed.
.P
In tiling mode windows are managed in a master and stacking column. The master
column contains the window which currently needs most attention, whereas the
stacking column contains all other windows. In floating mode windows can be
resized and moved freely. Dialog windows are always managed floating,
regardless of the mode selected.
.P
Windows are grouped by tags. Each window can be tagged with one or multiple
tags. Selecting a certain tag for viewing will display all windows with that
tag.
.P
.B dwm
contains a small status bar which displays all available tags, the mode, the
title of the focused window, and the text read from standard input. The tags of
the focused window are highlighted with a small point.
.P
.B dwm
draws a 1-pixel border around windows to indicate the focus state.
Unfocused windows contain a small bar in front of them displaying their title.
.SH OPTIONS
.TP
.B \-v
prints version information to standard output, then exits.
.SH USAGE
.SS Status bar
.TP
.B Standard input
is read and displayed in the status text area.
.TP
.B Button1
click on a tag label views all windows with that
.BR tag ,
click on the mode label toggles between
.B tiled
and
.B floating
mode.
.TP
.B Button3
click on a tag label adds/removes all windows with that
.B tag
to/from the view.
.TP
.B Mod1-Button1
click on a tag label applies that
.B tag
to the focused
.BR window .
.TP
.B Mod1-Button3
click on a tag label adds/removes that
.B tag
to/from the focused
.BR window .
.SS Keyboard commands
.TP
.B Mod1-Shift-Return
Start
.BR xterm (1).
.TP
.B Mod1-Tab
Focus next
.BR window .
.TP
.B Mod1-Shift-Tab
Focus previous
.BR window .
.TP
.B Mod1-Return
Zoom current
.B window
to the 
.B master
column
.RB ( tiling
mode only).
.TP
.B Mod1-m
Maximize current
.BR window .
.TP
.B Mod1-Shift-[1..n]
Apply
.B nth tag
to current
.BR window .
.TP
.B Mod1-Control-Shift-[1..n]
Add/remove
.B nth tag
to/from current
.BR window .
.TP
.B Mod1-Shift-c
Close focused
.B window.
.TP
.B Mod1-space
Toggle between
.B tiled
and
.B floating
mode (affects
.BR "all windows" ).
.TP
.B Mod1-[1..n]
View all windows with
.BR "tag n" .
.TP
.B Mod1-0
View all windows with any
.BR "tag" .
.TP
.B Mod1-Control-[1..n]
Add/remove all windows with
.B tag n
to/from the view.
.TP
.B Mod1-Shift-q
Quit
.B dwm.
.SS Mouse commands
.TP
.B Mod1-Button1
Move current
.B window
while dragging
.RB ( floating
mode only).
.TP
.B Mod1-Button2
Zoom current
.B window
to the 
.B master
column
.RB ( tiling
mode only).
.TP
.B Mod1-Button3
Resize current
.B window
while dragging
.RB ( floating
mode only).
.SH CUSTOMIZATION
.B dwm
is customized by creating a custom config.h and (re)compiling the source
code. This keeps it fast, secure and simple.
.SH CAVEATS
The status bar may display
.B broken pipe
when
.B dwm
has been started by
.BR xdm (1),
because it closes standard output before executing
.BR dwm .
.SH SEE ALSO
.BR dmenu (1)