mirror of https://github.com/vinc/moros.git
Update documentation (#592)
* Add ntp to manual * Refactor ntp script * Update website * Update install output * Move ntp to the bottom of the manual * Update light palette screenshot * Update manual install output * Update changelog * Refactor net code * Update website * Update binaries * Refactor long lines * Update changelog * Refactor device try_from * Update doc
This commit is contained in:
parent
4922b2efa8
commit
5ca0894241
|
@ -1,6 +1,12 @@
|
|||
# Changelog
|
||||
|
||||
## Unreleased
|
||||
- Improve setup process (#596)
|
||||
- Improve warning when MFS is not mounted (#595)
|
||||
- Bump pic8259 from 0.10.4 to 0.11.0 (#594)
|
||||
- Bump object from 0.33.0 to 0.34.0 (#593)
|
||||
- Add drive device (#555)
|
||||
- Add memory dump command (#574)
|
||||
- Fix shell autocomplete (#591)
|
||||
- Update x86_64 crate from 0.14.12 to 0.15.0 (#590)
|
||||
- Bump object from 0.32.2 to 0.33.0 (#589)
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.5 KiB |
82
doc/lisp.md
82
doc/lisp.md
|
@ -92,7 +92,7 @@ The interpreter can be invoked from the shell:
|
|||
|
||||
```
|
||||
> lisp
|
||||
MOROS Lisp v0.5.0
|
||||
MOROS Lisp v0.7.0
|
||||
|
||||
> (+ 1 2 3)
|
||||
6
|
||||
|
@ -170,44 +170,9 @@ Would produce the following output:
|
|||
|
||||
## Changelog
|
||||
|
||||
### 0.1.0 (2021-07-21)
|
||||
MOROS Lisp started from [Risp](https://github.com/stopachka/risp) and was
|
||||
extended to include the seven primitive operators and the two special forms of
|
||||
John McCarthy's paper "Recursive Functions of Symbolic Expressions and Their
|
||||
Computation by Machine" (1960) and "The Roots of Lisp" (2002) by Paul Graham.
|
||||
|
||||
### 0.2.0 (2021-12-04)
|
||||
The whole implementation was refactored and the parser was rewritten to use
|
||||
[Nom](https://github.com/Geal/nom). This allowed the addition of strings to the
|
||||
language and reading from the filesystem.
|
||||
|
||||
### 0.3.0 (2022-12-12)
|
||||
- Rewrite the evaluation code
|
||||
- Add new functions
|
||||
- Add a core library
|
||||
|
||||
### 0.3.1 (2022-06-06)
|
||||
- Rewrite parts of the code
|
||||
- Add new functions and examples
|
||||
|
||||
### 0.3.2 (2022-07-02)
|
||||
- Add new functions
|
||||
|
||||
### 0.4.0 (2022-08-25)
|
||||
- Rewrite a lot of the code
|
||||
- Add integer and big integer support
|
||||
- Add tail call optimization (TCO)
|
||||
- Add macro support
|
||||
|
||||
### 0.5.0 (2023-06-21)
|
||||
- Rename or add aliases to many functions
|
||||
- Add full support for line and inline comments
|
||||
- Add params to function representations
|
||||
- Add docstring to functions
|
||||
|
||||
### 0.6.0 (2023-09-23)
|
||||
- Add file, number, string, and regex namespaces
|
||||
- Add socket functions
|
||||
<!--
|
||||
### Unreleased
|
||||
-->
|
||||
|
||||
### 0.7.0 (2023-12-22)
|
||||
- Add binary and hexadecimal number literals
|
||||
|
@ -218,4 +183,41 @@ language and reading from the filesystem.
|
|||
- Use `/` instead of `.` as namespace separator
|
||||
- Add `number->string` (aliased to `num->str`) with an optional radix argument
|
||||
|
||||
### Unreleased
|
||||
### 0.6.0 (2023-09-23)
|
||||
- Add file, number, string, and regex namespaces
|
||||
- Add socket functions
|
||||
|
||||
### 0.5.0 (2023-06-21)
|
||||
- Rename or add aliases to many functions
|
||||
- Add full support for line and inline comments
|
||||
- Add params to function representations
|
||||
- Add docstring to functions
|
||||
|
||||
### 0.4.0 (2022-08-25)
|
||||
- Rewrite a lot of the code
|
||||
- Add integer and big integer support
|
||||
- Add tail call optimization (TCO)
|
||||
- Add macro support
|
||||
|
||||
### 0.3.2 (2022-07-02)
|
||||
- Add new functions
|
||||
|
||||
### 0.3.1 (2022-06-06)
|
||||
- Rewrite parts of the code
|
||||
- Add new functions and examples
|
||||
|
||||
### 0.3.0 (2022-12-12)
|
||||
- Rewrite the evaluation code
|
||||
- Add new functions
|
||||
- Add a core library
|
||||
|
||||
### 0.2.0 (2021-12-04)
|
||||
The whole implementation was refactored and the parser was rewritten to use
|
||||
[Nom](https://github.com/Geal/nom). This allowed the addition of strings to the
|
||||
language and reading from the filesystem.
|
||||
|
||||
### 0.1.0 (2021-07-21)
|
||||
MOROS Lisp started from [Risp](https://github.com/stopachka/risp) and was
|
||||
extended to include the seven primitive operators and the two special forms of
|
||||
John McCarthy's paper "Recursive Functions of Symbolic Expressions and Their
|
||||
Computation by Machine" (1960) and "The Roots of Lisp" (2002) by Paul Graham.
|
||||
|
|
|
@ -42,8 +42,7 @@ The first time MOROS will boot in diskless mode where you can use the builtin
|
|||
commands to test the system or `install` to setup the
|
||||
[filesystem](filesystem.md) on a disk:
|
||||
|
||||
MFS is not mounted to '/'
|
||||
Running console in diskless mode
|
||||
Warning: MFS not found, run 'install' to setup the system
|
||||
|
||||
/
|
||||
> install
|
||||
|
@ -54,6 +53,7 @@ commands to test the system or `install` to setup the
|
|||
Listing disks ...
|
||||
Path Name (Size)
|
||||
/dev/ata/0/0 QEMU HARDDISK QM00001 (32 MB)
|
||||
/dev/mem RAM DISK
|
||||
|
||||
Formatting disk ...
|
||||
Enter path of disk to format: /dev/ata/0/0
|
||||
|
@ -72,10 +72,17 @@ commands to test the system or `install` to setup the
|
|||
Created '/var'
|
||||
Copied '/bin/clear'
|
||||
Copied '/bin/halt'
|
||||
Copied '/bin/hello'
|
||||
Copied '/bin/ntp'
|
||||
Copied '/bin/print'
|
||||
Copied '/bin/reboot'
|
||||
Copied '/bin/sleep'
|
||||
Created '/dev/ata'
|
||||
Created '/dev/ata/0'
|
||||
Created '/dev/ata/0/0'
|
||||
Created '/dev/ata/0/1'
|
||||
Created '/dev/ata/1'
|
||||
Created '/dev/ata/1/0'
|
||||
Created '/dev/ata/1/1'
|
||||
Created '/dev/clk'
|
||||
Created '/dev/clk/uptime'
|
||||
Created '/dev/clk/realtime'
|
||||
|
@ -83,23 +90,29 @@ commands to test the system or `install` to setup the
|
|||
Created '/dev/null'
|
||||
Created '/dev/random'
|
||||
Created '/dev/console'
|
||||
Created '/dev/net'
|
||||
Created '/dev/net/tcp'
|
||||
Created '/dev/net/udp'
|
||||
Copied '/ini/banner.txt'
|
||||
Copied '/ini/boot.sh'
|
||||
Copied '/ini/lisp.lsp'
|
||||
Copied '/ini/shell.sh'
|
||||
Copied '/ini/version.txt'
|
||||
Created '/ini/palettes'
|
||||
Copied '/ini/palettes/gruvbox-dark.csv'
|
||||
Copied '/ini/palettes/gruvbox-light.csv'
|
||||
Copied '/ini/palettes/gruvbox-dark.sh'
|
||||
Copied '/ini/palettes/gruvbox-light.sh'
|
||||
Created '/ini/fonts'
|
||||
Copied '/ini/fonts/zap-light-8x16.psf'
|
||||
Copied '/ini/fonts/zap-vga-8x16.psf'
|
||||
Created '/lib/lisp'
|
||||
Copied '/lib/lisp/core.lsp'
|
||||
Copied '/lib/lisp/alias.lsp'
|
||||
Copied '/lib/lisp/core.lsp'
|
||||
Copied '/lib/lisp/file.lsp'
|
||||
Copied '/tmp/alice.txt'
|
||||
Copied '/tmp/machines.txt'
|
||||
Created '/tmp/lisp'
|
||||
Copied '/tmp/lisp/colors.lsp'
|
||||
Copied '/tmp/lisp/doc.lsp'
|
||||
Copied '/tmp/lisp/factorial.lsp'
|
||||
Copied '/tmp/lisp/fibonacci.lsp'
|
||||
Copied '/tmp/lisp/geotime.lsp'
|
||||
|
@ -119,8 +132,10 @@ commands to test the system or `install` to setup the
|
|||
Copied '/tmp/beep/tetris.sh'
|
||||
Copied '/tmp/beep/starwars.sh'
|
||||
Copied '/tmp/beep/mario.sh'
|
||||
Created '/var/log'
|
||||
Created '/var/www'
|
||||
Copied '/var/www/index.html'
|
||||
Copied '/var/www/moros.css'
|
||||
Copied '/var/www/moros.png'
|
||||
|
||||
Creating user...
|
||||
|
@ -137,7 +152,8 @@ diskless mode and let MOROS run the bootscript `/ini/boot.sh` to login and use
|
|||
the shell.
|
||||
|
||||
If no disks were detected or if you prefer not to use any you can mount the
|
||||
system in memory and use a virtual disk with `memory format` before `install`.
|
||||
system in memory and use a virtual disk with `memory format` before `install`
|
||||
or using `/dev/mem` for the disk during the setup.
|
||||
|
||||
## Shell
|
||||
|
||||
|
@ -188,6 +204,7 @@ The command has some options to sort the results:
|
|||
Usage: list <options> [<dir>]
|
||||
|
||||
Options:
|
||||
-b, --binary-size Use binary size
|
||||
-a, --all Show dot files
|
||||
-n, --name Sort by name
|
||||
-s, --size Sort by size
|
||||
|
@ -228,7 +245,7 @@ content to the file and `^Q` to quit the editor and go back to the shell.
|
|||
The `help` command has a subcommand `help edit` to list the editor commands:
|
||||
|
||||
> help edit
|
||||
MOROS text editor is a very simple editor inspired by Pico, Nano, and Micro.
|
||||
MOROS text editor is a very simple editor inspired by Pico.
|
||||
|
||||
Commands:
|
||||
^Q Quit editor
|
||||
|
@ -270,8 +287,8 @@ You can also set the `TZ` environment variable to use your preferred timezone:
|
|||
Add `env TZ 7200` to `/ini/boot.sh` before `shell` to save the timezone:
|
||||
|
||||
> read /ini/boot.sh
|
||||
vga set palette /ini/palettes/gruvbox-dark.csv
|
||||
vga set font /ini/fonts/zap-light-8x16.psf
|
||||
shell /ini/palettes/gruvbox-dark.sh
|
||||
read /ini/banner.txt
|
||||
user login
|
||||
env TZ 7200
|
||||
|
@ -353,3 +370,10 @@ Or the more specialized `http` command to request a document from a web server:
|
|||
<h1>MOROS</h1>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
There is also a `ntp` script to synchronize the clock over the network:
|
||||
|
||||
> ntp
|
||||
2023-03-21 10:00:00
|
||||
|
||||
> ntp => /dev/rtc
|
||||
|
|
|
@ -69,7 +69,7 @@ The `host` command performs DNS lookups:
|
|||
The `tcp` command connects to TCP sockets:
|
||||
|
||||
> tcp time.nist.gov:13 --verbose
|
||||
DEBUG: Connecting to 129.6.15.30:13
|
||||
DEBUG: Connected to 129.6.15.30:13
|
||||
|
||||
58884 20-02-05 19:19:42 00 0 0 49.2 UTC(NIST) *
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ additional common aliases.
|
|||
**Delete** file:
|
||||
|
||||
> d a.txt
|
||||
> del a.txt
|
||||
> delete a.txt
|
||||
|
||||
**Copy** file:
|
||||
|
@ -65,7 +64,7 @@ additional common aliases.
|
|||
When executed without arguments, this command will list the files of the
|
||||
current directory.
|
||||
|
||||
**Go to** dir:
|
||||
**Goto** dir:
|
||||
|
||||
> goto /usr/alice
|
||||
|
||||
|
|
BIN
dsk/bin/exec
BIN
dsk/bin/exec
Binary file not shown.
BIN
dsk/bin/halt
BIN
dsk/bin/halt
Binary file not shown.
BIN
dsk/bin/hello
BIN
dsk/bin/hello
Binary file not shown.
|
@ -17,5 +17,5 @@
|
|||
(var res (file/read socket 48))
|
||||
|
||||
(var buf (slice res 40 4))
|
||||
(var time (- (bin->num (concat '(0 0 0 0) buf) "int") 2208988800))
|
||||
(print (date time))
|
||||
(var num (- (bin->num (concat '(0 0 0 0) buf) "int") 2208988800))
|
||||
(print (date num))
|
||||
|
|
|
@ -35,17 +35,17 @@ impl TryFrom<&[u8]> for DeviceType {
|
|||
type Error = ();
|
||||
|
||||
fn try_from(buf: &[u8]) -> Result<Self, Self::Error> {
|
||||
match buf.get(0) {
|
||||
Some(i) if *i == DeviceType::Null as u8 => Ok(DeviceType::Null),
|
||||
Some(i) if *i == DeviceType::File as u8 => Ok(DeviceType::File),
|
||||
Some(i) if *i == DeviceType::Console as u8 => Ok(DeviceType::Console),
|
||||
Some(i) if *i == DeviceType::Random as u8 => Ok(DeviceType::Random),
|
||||
Some(i) if *i == DeviceType::Uptime as u8 => Ok(DeviceType::Uptime),
|
||||
Some(i) if *i == DeviceType::Realtime as u8 => Ok(DeviceType::Realtime),
|
||||
Some(i) if *i == DeviceType::RTC as u8 => Ok(DeviceType::RTC),
|
||||
Some(i) if *i == DeviceType::TcpSocket as u8 => Ok(DeviceType::TcpSocket),
|
||||
Some(i) if *i == DeviceType::UdpSocket as u8 => Ok(DeviceType::UdpSocket),
|
||||
Some(i) if *i == DeviceType::Drive as u8 => Ok(DeviceType::Drive),
|
||||
match buf.get(0).ok_or(())? {
|
||||
0 => Ok(DeviceType::Null),
|
||||
1 => Ok(DeviceType::File),
|
||||
2 => Ok(DeviceType::Console),
|
||||
3 => Ok(DeviceType::Random),
|
||||
4 => Ok(DeviceType::Uptime),
|
||||
5 => Ok(DeviceType::Realtime),
|
||||
6 => Ok(DeviceType::RTC),
|
||||
7 => Ok(DeviceType::TcpSocket),
|
||||
8 => Ok(DeviceType::UdpSocket),
|
||||
9 => Ok(DeviceType::Drive),
|
||||
_ => Err(()),
|
||||
}
|
||||
}
|
||||
|
@ -90,35 +90,17 @@ impl TryFrom<&[u8]> for Device {
|
|||
type Error = ();
|
||||
|
||||
fn try_from(buf: &[u8]) -> Result<Self, Self::Error> {
|
||||
match buf.try_into() {
|
||||
Ok(DeviceType::Null) => {
|
||||
Ok(Device::Null)
|
||||
}
|
||||
Ok(DeviceType::File) => {
|
||||
Ok(Device::File(File::new()))
|
||||
}
|
||||
Ok(DeviceType::Console) => {
|
||||
Ok(Device::Console(Console::new()))
|
||||
}
|
||||
Ok(DeviceType::Random) => {
|
||||
Ok(Device::Random(Random::new()))
|
||||
}
|
||||
Ok(DeviceType::Uptime) => {
|
||||
Ok(Device::Uptime(Uptime::new()))
|
||||
}
|
||||
Ok(DeviceType::Realtime) => {
|
||||
Ok(Device::Realtime(Realtime::new()))
|
||||
}
|
||||
Ok(DeviceType::RTC) => {
|
||||
Ok(Device::RTC(RTC::new()))
|
||||
}
|
||||
Ok(DeviceType::TcpSocket) => {
|
||||
Ok(Device::TcpSocket(TcpSocket::new()))
|
||||
}
|
||||
Ok(DeviceType::UdpSocket) => {
|
||||
Ok(Device::UdpSocket(UdpSocket::new()))
|
||||
}
|
||||
Ok(DeviceType::Drive) if buf.len() > 2 => {
|
||||
match buf.try_into()? {
|
||||
DeviceType::Null => Ok(Device::Null),
|
||||
DeviceType::File => Ok(Device::File(File::new())),
|
||||
DeviceType::Console => Ok(Device::Console(Console::new())),
|
||||
DeviceType::Random => Ok(Device::Random(Random::new())),
|
||||
DeviceType::Uptime => Ok(Device::Uptime(Uptime::new())),
|
||||
DeviceType::Realtime => Ok(Device::Realtime(Realtime::new())),
|
||||
DeviceType::RTC => Ok(Device::RTC(RTC::new())),
|
||||
DeviceType::TcpSocket => Ok(Device::TcpSocket(TcpSocket::new())),
|
||||
DeviceType::UdpSocket => Ok(Device::UdpSocket(UdpSocket::new())),
|
||||
DeviceType::Drive if buf.len() > 2 => {
|
||||
let bus = buf[1];
|
||||
let dsk = buf[2];
|
||||
if let Some(drive) = Drive::open(bus, dsk) {
|
||||
|
|
|
@ -259,16 +259,10 @@ pub fn init() {
|
|||
*NET.lock() = Some((iface, device));
|
||||
}
|
||||
};
|
||||
if let Some(io_base) = find_pci_io_base(0x10EC, 0x8139) {
|
||||
add(
|
||||
EthernetDevice::RTL8139(nic::rtl8139::Device::new(io_base)),
|
||||
"RTL8139",
|
||||
);
|
||||
if let Some(io) = find_pci_io_base(0x10EC, 0x8139) {
|
||||
add(EthernetDevice::RTL8139(nic::rtl8139::Device::new(io)), "RTL8139");
|
||||
}
|
||||
if let Some(io_base) = find_pci_io_base(0x1022, 0x2000) {
|
||||
add(
|
||||
EthernetDevice::PCNET(nic::pcnet::Device::new(io_base)),
|
||||
"PCNET",
|
||||
);
|
||||
if let Some(io) = find_pci_io_base(0x1022, 0x2000) {
|
||||
add(EthernetDevice::PCNET(nic::pcnet::Device::new(io)), "PCNET");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -575,7 +575,9 @@ fn dispatch(args: &[&str], config: &mut Config) -> Result<(), ExitCode> {
|
|||
config.env.insert("DIR".to_string(), sys::process::dir());
|
||||
Ok(())
|
||||
}
|
||||
Some(FileType::File) => spawn(&path, args, config),
|
||||
Some(FileType::File) => {
|
||||
spawn(&path, args, config)
|
||||
}
|
||||
_ => {
|
||||
let path = format!("/bin/{}", args[0]);
|
||||
spawn(&path, args, config)
|
||||
|
@ -585,7 +587,11 @@ fn dispatch(args: &[&str], config: &mut Config) -> Result<(), ExitCode> {
|
|||
}
|
||||
}
|
||||
|
||||
fn spawn(path: &str, args: &[&str], config: &mut Config) -> Result<(), ExitCode> {
|
||||
fn spawn(
|
||||
path: &str,
|
||||
args: &[&str],
|
||||
config: &mut Config
|
||||
) -> Result<(), ExitCode> {
|
||||
// Script
|
||||
if let Ok(contents) = fs::read_to_string(path) {
|
||||
if contents.starts_with("#!") {
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
<li><code>CTRL</code> + <code>E</code> to move cursor to enf of line</li>
|
||||
<li><code>CTRL</code> + <code>T</code> to move cursor to begining of file</li>
|
||||
<li><code>CTRL</code> + <code>B</code> to move cursor to enf of file</li>
|
||||
<li><code>CTRL</code> + <code>d</code> to cut (delete) a line</li>
|
||||
<li><code>CTRL</code> + <code>y</code> to copy (yank) a line</li>
|
||||
<li><code>CTRL</code> + <code>p</code> to paste (put) a line</li>
|
||||
<li><code>CTRL</code> + <code>D</code> to cut (delete) a line</li>
|
||||
<li><code>CTRL</code> + <code>Y</code> to copy (yank) a line</li>
|
||||
<li><code>CTRL</code> + <code>P</code> to paste (put) a line</li>
|
||||
</ul>
|
||||
<footer><p><a href="/">MOROS</a></footer>
|
||||
</body>
|
||||
|
|
|
@ -126,8 +126,8 @@ alloc = number of allocated blocks
|
|||
|
||||
<h3>File</h3>
|
||||
|
||||
<p>The first block of a contains the address of the next block where its contents
|
||||
is stored and the beginning of its contents in the rest of the block.</p>
|
||||
<p>The first block of a file contains the address of the next block where its
|
||||
contents is stored and the beginning of its contents in the rest of the block.</p>
|
||||
|
||||
<p>If all contents can fit into one block the address of the next block will be
|
||||
empty.</p>
|
||||
|
|
122
www/lisp.html
122
www/lisp.html
|
@ -119,7 +119,7 @@ of the Shell.</p>
|
|||
<p>The interpreter can be invoked from the shell:</p>
|
||||
|
||||
<pre><code>> lisp
|
||||
MOROS Lisp v0.5.0
|
||||
MOROS Lisp v0.7.0
|
||||
|
||||
> (+ 1 2 3)
|
||||
6
|
||||
|
@ -194,64 +194,9 @@ with the following content:</p>
|
|||
|
||||
<h2>Changelog</h2>
|
||||
|
||||
<h3>0.1.0 (2021-07-21)</h3>
|
||||
|
||||
<p>MOROS Lisp started from <a href="https://github.com/stopachka/risp">Risp</a> and was
|
||||
extended to include the seven primitive operators and the two special forms of
|
||||
John McCarthy's paper "Recursive Functions of Symbolic Expressions and Their
|
||||
Computation by Machine" (1960) and "The Roots of Lisp" (2002) by Paul Graham.</p>
|
||||
|
||||
<h3>0.2.0 (2021-12-04)</h3>
|
||||
|
||||
<p>The whole implementation was refactored and the parser was rewritten to use
|
||||
<a href="https://github.com/Geal/nom">Nom</a>. This allowed the addition of strings to the
|
||||
language and reading from the filesystem.</p>
|
||||
|
||||
<h3>0.3.0 (2022-12-12)</h3>
|
||||
|
||||
<ul>
|
||||
<li>Rewrite the evaluation code</li>
|
||||
<li>Add new functions</li>
|
||||
<li>Add a core library</li>
|
||||
</ul>
|
||||
|
||||
<h3>0.3.1 (2022-06-06)</h3>
|
||||
|
||||
<ul>
|
||||
<li>Rewrite parts of the code</li>
|
||||
<li>Add new functions and examples</li>
|
||||
</ul>
|
||||
|
||||
<h3>0.3.2 (2022-07-02)</h3>
|
||||
|
||||
<ul>
|
||||
<li>Add new functions</li>
|
||||
</ul>
|
||||
|
||||
<h3>0.4.0 (2022-08-25)</h3>
|
||||
|
||||
<ul>
|
||||
<li>Rewrite a lot of the code</li>
|
||||
<li>Add integer and big integer support</li>
|
||||
<li>Add tail call optimization (TCO)</li>
|
||||
<li>Add macro support</li>
|
||||
</ul>
|
||||
|
||||
<h3>0.5.0 (2023-06-21)</h3>
|
||||
|
||||
<ul>
|
||||
<li>Rename or add aliases to many functions</li>
|
||||
<li>Add full support for line and inline comments</li>
|
||||
<li>Add params to function representations</li>
|
||||
<li>Add docstring to functions</li>
|
||||
</ul>
|
||||
|
||||
<h3>0.6.0 (2023-09-23)</h3>
|
||||
|
||||
<ul>
|
||||
<li>Add file, number, string, and regex namespaces</li>
|
||||
<li>Add socket functions</li>
|
||||
</ul>
|
||||
<!--
|
||||
### Unreleased
|
||||
-->
|
||||
|
||||
<h3>0.7.0 (2023-12-22)</h3>
|
||||
|
||||
|
@ -265,7 +210,64 @@ language and reading from the filesystem.</p>
|
|||
<li>Add <code>number->string</code> (aliased to <code>num->str</code>) with an optional radix argument</li>
|
||||
</ul>
|
||||
|
||||
<h3>Unreleased</h3>
|
||||
<h3>0.6.0 (2023-09-23)</h3>
|
||||
|
||||
<ul>
|
||||
<li>Add file, number, string, and regex namespaces</li>
|
||||
<li>Add socket functions</li>
|
||||
</ul>
|
||||
|
||||
<h3>0.5.0 (2023-06-21)</h3>
|
||||
|
||||
<ul>
|
||||
<li>Rename or add aliases to many functions</li>
|
||||
<li>Add full support for line and inline comments</li>
|
||||
<li>Add params to function representations</li>
|
||||
<li>Add docstring to functions</li>
|
||||
</ul>
|
||||
|
||||
<h3>0.4.0 (2022-08-25)</h3>
|
||||
|
||||
<ul>
|
||||
<li>Rewrite a lot of the code</li>
|
||||
<li>Add integer and big integer support</li>
|
||||
<li>Add tail call optimization (TCO)</li>
|
||||
<li>Add macro support</li>
|
||||
</ul>
|
||||
|
||||
<h3>0.3.2 (2022-07-02)</h3>
|
||||
|
||||
<ul>
|
||||
<li>Add new functions</li>
|
||||
</ul>
|
||||
|
||||
<h3>0.3.1 (2022-06-06)</h3>
|
||||
|
||||
<ul>
|
||||
<li>Rewrite parts of the code</li>
|
||||
<li>Add new functions and examples</li>
|
||||
</ul>
|
||||
|
||||
<h3>0.3.0 (2022-12-12)</h3>
|
||||
|
||||
<ul>
|
||||
<li>Rewrite the evaluation code</li>
|
||||
<li>Add new functions</li>
|
||||
<li>Add a core library</li>
|
||||
</ul>
|
||||
|
||||
<h3>0.2.0 (2021-12-04)</h3>
|
||||
|
||||
<p>The whole implementation was refactored and the parser was rewritten to use
|
||||
<a href="https://github.com/Geal/nom">Nom</a>. This allowed the addition of strings to the
|
||||
language and reading from the filesystem.</p>
|
||||
|
||||
<h3>0.1.0 (2021-07-21)</h3>
|
||||
|
||||
<p>MOROS Lisp started from <a href="https://github.com/stopachka/risp">Risp</a> and was
|
||||
extended to include the seven primitive operators and the two special forms of
|
||||
John McCarthy's paper "Recursive Functions of Symbolic Expressions and Their
|
||||
Computation by Machine" (1960) and "The Roots of Lisp" (2002) by Paul Graham.</p>
|
||||
<footer><p><a href="/">MOROS</a></footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -51,8 +51,7 @@ memory size, processor, devices, network cards, disks, and the real time clock.<
|
|||
commands to test the system or <code>install</code> to setup the
|
||||
<a href="filesystem.html">filesystem</a> on a disk:</p>
|
||||
|
||||
<pre><code>MFS is not mounted to '/'
|
||||
Running console in diskless mode
|
||||
<pre><code>Warning: MFS not found, run 'install' to setup the system
|
||||
|
||||
/
|
||||
> install
|
||||
|
@ -63,6 +62,7 @@ Proceed? [y/N] y
|
|||
Listing disks ...
|
||||
Path Name (Size)
|
||||
/dev/ata/0/0 QEMU HARDDISK QM00001 (32 MB)
|
||||
/dev/mem RAM DISK
|
||||
|
||||
Formatting disk ...
|
||||
Enter path of disk to format: /dev/ata/0/0
|
||||
|
@ -81,10 +81,17 @@ Created '/usr'
|
|||
Created '/var'
|
||||
Copied '/bin/clear'
|
||||
Copied '/bin/halt'
|
||||
Copied '/bin/hello'
|
||||
Copied '/bin/ntp'
|
||||
Copied '/bin/print'
|
||||
Copied '/bin/reboot'
|
||||
Copied '/bin/sleep'
|
||||
Created '/dev/ata'
|
||||
Created '/dev/ata/0'
|
||||
Created '/dev/ata/0/0'
|
||||
Created '/dev/ata/0/1'
|
||||
Created '/dev/ata/1'
|
||||
Created '/dev/ata/1/0'
|
||||
Created '/dev/ata/1/1'
|
||||
Created '/dev/clk'
|
||||
Created '/dev/clk/uptime'
|
||||
Created '/dev/clk/realtime'
|
||||
|
@ -92,23 +99,29 @@ Created '/dev/rtc'
|
|||
Created '/dev/null'
|
||||
Created '/dev/random'
|
||||
Created '/dev/console'
|
||||
Created '/dev/net'
|
||||
Created '/dev/net/tcp'
|
||||
Created '/dev/net/udp'
|
||||
Copied '/ini/banner.txt'
|
||||
Copied '/ini/boot.sh'
|
||||
Copied '/ini/lisp.lsp'
|
||||
Copied '/ini/shell.sh'
|
||||
Copied '/ini/version.txt'
|
||||
Created '/ini/palettes'
|
||||
Copied '/ini/palettes/gruvbox-dark.csv'
|
||||
Copied '/ini/palettes/gruvbox-light.csv'
|
||||
Copied '/ini/palettes/gruvbox-dark.sh'
|
||||
Copied '/ini/palettes/gruvbox-light.sh'
|
||||
Created '/ini/fonts'
|
||||
Copied '/ini/fonts/zap-light-8x16.psf'
|
||||
Copied '/ini/fonts/zap-vga-8x16.psf'
|
||||
Created '/lib/lisp'
|
||||
Copied '/lib/lisp/core.lsp'
|
||||
Copied '/lib/lisp/alias.lsp'
|
||||
Copied '/lib/lisp/core.lsp'
|
||||
Copied '/lib/lisp/file.lsp'
|
||||
Copied '/tmp/alice.txt'
|
||||
Copied '/tmp/machines.txt'
|
||||
Created '/tmp/lisp'
|
||||
Copied '/tmp/lisp/colors.lsp'
|
||||
Copied '/tmp/lisp/doc.lsp'
|
||||
Copied '/tmp/lisp/factorial.lsp'
|
||||
Copied '/tmp/lisp/fibonacci.lsp'
|
||||
Copied '/tmp/lisp/geotime.lsp'
|
||||
|
@ -128,8 +141,10 @@ Created '/tmp/beep'
|
|||
Copied '/tmp/beep/tetris.sh'
|
||||
Copied '/tmp/beep/starwars.sh'
|
||||
Copied '/tmp/beep/mario.sh'
|
||||
Created '/var/log'
|
||||
Created '/var/www'
|
||||
Copied '/var/www/index.html'
|
||||
Copied '/var/www/moros.css'
|
||||
Copied '/var/www/moros.png'
|
||||
|
||||
Creating user...
|
||||
|
@ -147,7 +162,8 @@ diskless mode and let MOROS run the bootscript <code>/ini/boot.sh</code> to logi
|
|||
the shell.</p>
|
||||
|
||||
<p>If no disks were detected or if you prefer not to use any you can mount the
|
||||
system in memory and use a virtual disk with <code>memory format</code> before <code>install</code>.</p>
|
||||
system in memory and use a virtual disk with <code>memory format</code> before <code>install</code>
|
||||
or using <code>/dev/mem</code> for the disk during the setup.</p>
|
||||
|
||||
<h2>Shell</h2>
|
||||
|
||||
|
@ -202,6 +218,7 @@ tilde <code>~</code> means that you are in your home directory:</p>
|
|||
Usage: list <options> [<dir>]
|
||||
|
||||
Options:
|
||||
-b, --binary-size Use binary size
|
||||
-a, --all Show dot files
|
||||
-n, --name Sort by name
|
||||
-s, --size Sort by size
|
||||
|
@ -246,7 +263,7 @@ content to the file and <code>^Q</code> to quit the editor and go back to the sh
|
|||
<p>The <code>help</code> command has a subcommand <code>help edit</code> to list the editor commands:</p>
|
||||
|
||||
<pre><code>> help edit
|
||||
MOROS text editor is a very simple editor inspired by Pico, Nano, and Micro.
|
||||
MOROS text editor is a very simple editor inspired by Pico.
|
||||
|
||||
Commands:
|
||||
^Q Quit editor
|
||||
|
@ -292,8 +309,8 @@ file:</p>
|
|||
<p>Add <code>env TZ 7200</code> to <code>/ini/boot.sh</code> before <code>shell</code> to save the timezone:</p>
|
||||
|
||||
<pre><code>> read /ini/boot.sh
|
||||
vga set palette /ini/palettes/gruvbox-dark.csv
|
||||
vga set font /ini/fonts/zap-light-8x16.psf
|
||||
shell /ini/palettes/gruvbox-dark.sh
|
||||
read /ini/banner.txt
|
||||
user login
|
||||
env TZ 7200
|
||||
|
@ -382,6 +399,14 @@ Hello, World!
|
|||
<h1>MOROS</h1>
|
||||
</body>
|
||||
</html>
|
||||
</code></pre>
|
||||
|
||||
<p>There is also a <code>ntp</code> script to synchronize the clock over the network:</p>
|
||||
|
||||
<pre><code>> ntp
|
||||
2023-03-21 10:00:00
|
||||
|
||||
> ntp => /dev/rtc
|
||||
</code></pre>
|
||||
<footer><p><a href="/">MOROS</a></footer>
|
||||
</body>
|
||||
|
|
|
@ -83,7 +83,7 @@ dns: 10.0.2.3
|
|||
<p>The <code>tcp</code> command connects to TCP sockets:</p>
|
||||
|
||||
<pre><code>> tcp time.nist.gov:13 --verbose
|
||||
DEBUG: Connecting to 129.6.15.30:13
|
||||
DEBUG: Connected to 129.6.15.30:13
|
||||
|
||||
58884 20-02-05 19:19:42 00 0 0 49.2 UTC(NIST) *
|
||||
</code></pre>
|
||||
|
|
|
@ -33,7 +33,6 @@ additional common aliases.</p>
|
|||
<p><strong>Delete</strong> file:</p>
|
||||
|
||||
<pre><code>> d a.txt
|
||||
> del a.txt
|
||||
> delete a.txt
|
||||
</code></pre>
|
||||
|
||||
|
@ -80,7 +79,7 @@ additional common aliases.</p>
|
|||
<p>When executed without arguments, this command will list the files of the
|
||||
current directory.</p>
|
||||
|
||||
<p><strong>Go to</strong> dir:</p>
|
||||
<p><strong>Goto</strong> dir:</p>
|
||||
|
||||
<pre><code>> goto /usr/alice
|
||||
</code></pre>
|
||||
|
|
Loading…
Reference in New Issue