Skip to content

Commit

Permalink
Merge pull request #35 from Dyalog/src
Browse files Browse the repository at this point in the history
Restructure source files into separate folder
  • Loading branch information
rodrigogiraoserrao authored Apr 7, 2022
2 parents 334e792 + 2e6f5a5 commit 52223eb
Show file tree
Hide file tree
Showing 17 changed files with 131 additions and 168 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ In the first instance, it lists the changes between consecutive releases of this
However, because this book is a rework of the first edition by Bernard Legrand,
this changelog also marks with [n] content that is new in this rework.

## 0.4.5

- Moved source files into dedicated folder `docs`.
- Simplified build process by removing resource migration.

## 0.4.4

- Improve exercise presentation:
Expand Down
3 changes: 2 additions & 1 deletion book/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ author: Bernard Legrand, reworked by Rodrigo Girão Serrão.

repository:
url: https://github.com/Dyalog/MDAPL

path_to_book: docs

html:
home_page_in_navbar: false
use_edit_page_button: true
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions Data-and-Variables.ipynb → docs/Data-and-Variables.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1647,7 +1647,7 @@
"\n",
"If a vector is too long to be displayed in a single line on your screen, the interpreter session will wrap it onto several lines. But to prevent possible confusion with the display of a matrix, the second line and the following lines will not be aligned at the left margin, but will be indented six characters to the right. To show you what we mean, the figure below contains a screenshot of the Windows IDE when we display the variable `bignum`; the vector is split in three lines and some of the values are only visible if you scroll right.\n",
"\n",
"![A long variable being wrapped in the Windows IDE.](res/Bignum_Output.png)\n",
"![A long variable being wrapped in the Windows IDE.](../res/Bignum_Output.png)\n",
"\n",
"Depending on the format in which you are reading this book, you may or may not be able to see all the numbers and they may or may not be laid out in several lines. If they are, then the first line will also not be indented, like in the figure above."
]
Expand Down Expand Up @@ -4869,7 +4869,7 @@
" - in the \"File\" menu, select \"Save\" or \"Save as\", and use the normal procedure for saving a file (highlighted in red below); or\n",
" - you can click, in the toolbar, on the icon of a diskette (also highlighted in red below; who still knows what a diskette is?), which is equivalent, in APL, to \"Save as\".\n",
" \n",
"![Windows IDE toolbar with the \"Save\" toolbar shortcut and the \"File\" menu highlighted.](res/Interpreter_Toolbar_Save.png)\n",
"![Windows IDE toolbar with the \"Save\" toolbar shortcut and the \"File\" menu highlighted.](../res/Interpreter_Toolbar_Save.png)\n",
" \n",
"If you are using RIDE or if you don't like clicking menu buttons,\n",
"\n",
Expand Down Expand Up @@ -5067,7 +5067,7 @@
"source": [
"This is a bit brutal: all of the contents of the WS are deleted, and no warning message is issued to notify the user of the consequence before the execution of the command. You should avoid using this command, and instead use the \"Clear\" button on the interpreter toolbar (highlighted in red below), which asks for confirmation. It is safer.\n",
"\n",
"![Windows IDE with the \"Clear\" toolbar shortcut highlighted.](res/Interpreter_Toolbar_Clear.png)\n",
"![Windows IDE with the \"Clear\" toolbar shortcut highlighted.](../res/Interpreter_Toolbar_Clear.png)\n",
"\n",
"<!-- begin remark -->\n",
"***Remark***:\n",
Expand Down Expand Up @@ -5176,7 +5176,7 @@
" - you can click on the \"Open\" icon in the toolbar (highlighted in red below); or\n",
" - you can issue the system command `)load`\n",
" \n",
"![Windows IDE with the \"Load\" toolbar shortcut highlighted.](res/Interpreter_Toolbar_Load.png)\n",
"![Windows IDE with the \"Load\" toolbar shortcut highlighted.](../res/Interpreter_Toolbar_Load.png)\n",
"\n",
"In all these cases, you will see the familiar file search box, in which you can browse to and select the workspace file you would like to open (or load).\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@
"We saw in [the chapter about user-defined functions](./User-Defined-Functions.ipynb) that _format_ can be used to convert numbers to characters; the reverse can be done using _execute_.\n",
"This explains why those two functions are represented by \"reversed\" symbols, as shown in <!--figure-->the figure below<!--Dual_Execute_Format-->:\n",
"\n",
"![Representation of the duality between the _execute_ and _format_ primitives.](res/Dual_Execute_Format.png)\n",
"![Representation of the duality between the _execute_ and _format_ primitives.](../res/Dual_Execute_Format.png)\n",
"\n",
"There is, however, a major difference: _format_ can be applied to matrices, whereas _execute_ can only be applied to vectors."
]
Expand Down Expand Up @@ -6243,7 +6243,7 @@
"When using the interpreter, the output is \"too wide\" if it would extend beyond the session window width.\n",
"The <!--figure-->figure below<!--Session_Wrap--> shows that when the output is \"too wide\", it wraps to the next line(s).\n",
"\n",
"![Long output wrapping to the next line(s).](res/Session_Wrap.png)\n",
"![Long output wrapping to the next line(s).](../res/Session_Wrap.png)\n",
"\n",
"Despite using the session width to automatically decide if the output is too wide or not, the user can have some control over that, even before bringing in `]rows` to the table.\n",
"Through the system variable _print width_ `⎕PW`, the user can control the number of characters that are allowed per line before the output is wrapped onto the next line.\n",
Expand Down Expand Up @@ -6529,13 +6529,13 @@
"\n",
"<!--figure-->The figure below<!--Session_Rows_Style_Long_Cut--> shows what the session looks like after running an expression that produces a line of output that is wider than the screen width.\n",
"\n",
"![\"A long line of session output with two different `-style` configurations.\"](res/Session_Rows_Style_Long_Cut.png)\n",
"![\"A long line of session output with two different `-style` configurations.\"](../res/Session_Rows_Style_Long_Cut.png)\n",
"\n",
"We can see that after setting `-style=cut`, the output was replaced with \"∙∙∙\" near the right edge of the screen.\n",
"If we scroll horizontally to the right, we can see that `-style=long` does allow the output to run beyond the screen and `-style=cut` effectively truncates it.\n",
"This is shown in <!--figure-->the next figure<!--Session_Rows_Style_Long_Cut_Right-->, which is a screenshot from the exact same session output as above, except we have scrolled slightly to the right.\n",
"\n",
"![\"A long line of output and the corresponding truncated version.\"](res/Session_Rows_Style_Long_Cut_Right.png)\n",
"![\"A long line of output and the corresponding truncated version.\"](../res/Session_Rows_Style_Long_Cut_Right.png)\n",
"\n",
"Finally, the `-style=` modifier accepts one other option, which is `-style=wrap`.\n",
"This sets the behaviour of long lines to wrap to new lines, but this isn't exactly the same as having `]rows off`, because `]rows` doesn't rely on `⎕PW` to figure out the screen width.\n",
Expand Down Expand Up @@ -6586,7 +6586,7 @@
"source": [
"Another difference between having `]rows off` and `]rows on -style=wrap` is that `]rows off` will wrap the lines of output as a block, whereas `-style=wrap` will wrap each line individually, like <!--figure-->the next figure<!--Session_Rows_Off_VS_Wrapping--> shows.\n",
"\n",
"![\"Block wrapping versus individual line wrapping.\"](res/Session_Rows_Off_VS_Wrapping.png)\n",
"![\"Block wrapping versus individual line wrapping.\"](../res/Session_Rows_Off_VS_Wrapping.png)\n",
"\n",
"Having looked at the different options for `-style=`, we are now left with three modifiers.\n",
"\n",
Expand Down Expand Up @@ -7046,7 +7046,7 @@
"id": "moral-empty",
"metadata": {},
"source": [
"![Dyalog APL programming is pure Art.](res/Programming_Art.png)"
"![Dyalog APL programming is pure Art.](../res/Programming_Art.png)"
]
},
{
Expand Down
Loading

0 comments on commit 52223eb

Please sign in to comment.