From 5ca08942414cc6b75816f67dce648780a380b351 Mon Sep 17 00:00:00 2001 From: Vincent Ollivier Date: Fri, 15 Mar 2024 19:08:10 +0100 Subject: [PATCH] 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 --- CHANGELOG.md | 6 +++ doc/images/light.png | Bin 3738 -> 3630 bytes doc/lisp.md | 82 +++++++++++++++-------------- doc/manual.md | 50 +++++++++++++----- doc/network.md | 2 +- doc/shell.md | 3 +- dsk/bin/exec | Bin 22896 -> 22864 bytes dsk/bin/halt | Bin 1184 -> 1200 bytes dsk/bin/hello | Bin 19464 -> 19416 bytes dsk/bin/ntp | 4 +- src/sys/fs/device.rs | 62 ++++++++-------------- src/sys/net/mod.rs | 14 ++--- src/usr/shell.rs | 10 +++- www/editor.html | 6 +-- www/filesystem.html | 4 +- www/lisp.html | 122 ++++++++++++++++++++++--------------------- www/manual.html | 51 +++++++++++++----- www/network.html | 2 +- www/shell.html | 3 +- 19 files changed, 230 insertions(+), 191 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5626cf2..1e0bc50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/doc/images/light.png b/doc/images/light.png index f3b7cebb75cb1c1c3a619f347e9cf45dfe389f2d..eeab1ff49496e76da9c5dfb53fd2ed15922c0e7a 100644 GIT binary patch delta 3401 zcmZ`*2UOG9(&vRL2w6H02&@$}h9-!F7C=Nqg9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}fC7VC(bO79$(*Kjz^5Db!Aw;Kyrkcn)ub5X1EG28K zNc^})0Y3-vB=d~lav7pJBJqT-yzDLkGD(B=wrjn{F60^N1i+PecegWvs5XNB4MEut z%@e}z?DHN2You{qke4}zggUO>nU1DBD$MIZQ?@@aD9b1AfQU*=4OJqT99S58^7V~% zh>Mc>tWA9TvDRHfvBcc^{*Mz5HZ=+F($BiK*&Jspp=mmyrWiPTg^9#r&&VwHDPV{h z5`aTBSRUXkCa{Mh-?WSJ z>6@(QC~z-bA&CIe7`0d&4o|k1liC!eg1dyp&0uljT18C7VMgGa={koZV91|Mba|sm zc+S{l zbR7oPt+fB1XaF5X`m@i=AFxZ2IR~jIQKrE1L>jhEn9Oc5=Ae`)bJ1w{^XMNBL|OWV zG^_)5mp?6#dJjpNx@$*cB^g5xM3tm^vAvYx$5`r&|M6epeC`JVJt349se;2gm_nPO zds=X<2U&4x?n)q=7k6^pL0`*#gWf#*5Ibr&4opAGiXrB%$cI2q zxo>2I#LlK>{?-OHIp6Zj+JbDN>Q^dJ6V6t!KlMyiI@PKqNq7G5VsB$ct67C2zTQAu z(c7q|Lt_{{AMM6LRd&Dd#L7QILADU#8l4_Y#KI$c^}K5Ct4i06js$TOEy|&!;i+gn&yIfzuh!9&Hu@ zoLFu6s0^A8w}Yk=wc&?ujBf^zZ$Jz=5#A0ZyfLqEc!Z^3;1x8UtPSsTV?=5+8bF{w zP2F1h1c|!@xL|+e6J14+`2mu&;Y#v3Z8%mUEm>4r()veV%w;E9!(f 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 + ### 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. diff --git a/doc/manual.md b/doc/manual.md index 5413777..4294106 100644 --- a/doc/manual.md +++ b/doc/manual.md @@ -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,10 +204,11 @@ The command has some options to sort the results: Usage: list [] Options: - -a, --all Show dot files - -n, --name Sort by name - -s, --size Sort by size - -t, --time Sort by time + -b, --binary-size Use binary size + -a, --all Show dot files + -n, --name Sort by name + -s, --size Sort by size + -t, --time Sort by time You can write a directory in the disk with `write`: @@ -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:

MOROS

+ +There is also a `ntp` script to synchronize the clock over the network: + + > ntp + 2023-03-21 10:00:00 + + > ntp => /dev/rtc diff --git a/doc/network.md b/doc/network.md index 5ff3162..122790a 100644 --- a/doc/network.md +++ b/doc/network.md @@ -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) * diff --git a/doc/shell.md b/doc/shell.md index 29ec303..ba5a4bb 100644 --- a/doc/shell.md +++ b/doc/shell.md @@ -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 diff --git a/dsk/bin/exec b/dsk/bin/exec index fdbd631ae851c5e17e8fdb3ccf9628bf044fe301..4002e1ccf2b8016b7e4ec4fcee7d8ac2a022399c 100644 GIT binary patch delta 3877 zcmb7H4Nz3q6~6DmQ$X-72rRn_`+((7AYyV$o#|YywDKtjp?VNt>vfDbFRlM{0CHx8!{N`anQGb|-0u zK}?AeGg;@RpDJVBE+hP1Hi;SVWEXvd+vL`b$<&qEbyHW)shgHfNHQo7G#^w2S_j$! zY6W$G4*Z|=={Wo0adYM;@b7rgSNU`|Ia5H00_o>Dgd7AV=MoKT!<^}6xCq$?dJOV= zuw$4>R$#ZF3o!Ub=+=RnK?-OqsI-`nhH-SioKMI`MLo83p(=_Hfu7)|(qUUVzc`NGu_Z?At{_D0COzzEW#zQ`LoCg) zCvY#(8vCj#v;X1uf7&E_8l4u|Q|}a2TLk^kp2qcizqLnlT$eX+S~|zI((G6(S4ZX8 z(nzPQxjV`VP4lVlwbOmEr@1oP7#Gj)x6%D^HonD1569WFK97a*B)Qe!Fi|aXX!Evu zXQArT@MHIlixtt{07o51H|6KX+R9n5mCh>Jv(yHZfQxuNyGd_PKj(G;cKKa5)Z}>0sV6GQL?TV(J=}*LiM^RK zA>SBu1qvLsCu#?SP|-v^WkQ1tVj;6+e`un|OjJE2xsAm(wmBFem!?_V7_{4j-ZWP- ze_KuTEfZDOnb2$oX|W8O&;ahNtQ?n>eznNlg*P9`W4_*$=(!nv)_g2+`5r|%url!E zMZ?X-6XEnP8EFxV2K@fRtoS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*$Q%5|!lj6-IEeYCYc`LX%d z$1xp0vE&QstnB{ysQuAo_x!o( zus(F36&th_=VvHucu%>6(JUd1LSq^}ph;X+h0tgjrIIU};X;|DAivf0O8PaDuZ&Vr z_Cy)20xtnq()fmC_XW+W1tZ^Ry1w|udHQ_+`S!nS{!wfxP*~GdZB}Q0%!4+QNzDO& zPbtI;k|Lv3mBeT|x`sk#O=oA#s6f;8^L`c>yIlpewV^phdR)SImh`g5=tRS=%$|Lc zVv1{2<$-Ed`ZfIJK&w2;aU*oa>Y|w0e>qxLm&Y7!=q3IL+^y=#Jcs*=4J6X^e TU9qMdFQ#=(4R@9HuF3fyvdBGS diff --git a/dsk/bin/ntp b/dsk/bin/ntp index d0584bf..8e6ac9d 100644 --- a/dsk/bin/ntp +++ b/dsk/bin/ntp @@ -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)) diff --git a/src/sys/fs/device.rs b/src/sys/fs/device.rs index 7708b42..57b3cb3 100644 --- a/src/sys/fs/device.rs +++ b/src/sys/fs/device.rs @@ -35,17 +35,17 @@ impl TryFrom<&[u8]> for DeviceType { type Error = (); fn try_from(buf: &[u8]) -> Result { - 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 { - 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) { diff --git a/src/sys/net/mod.rs b/src/sys/net/mod.rs index e5c5e7c..e7271ce 100644 --- a/src/sys/net/mod.rs +++ b/src/sys/net/mod.rs @@ -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"); } } diff --git a/src/usr/shell.rs b/src/usr/shell.rs index 4c5cce1..59dd300 100644 --- a/src/usr/shell.rs +++ b/src/usr/shell.rs @@ -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("#!") { diff --git a/www/editor.html b/www/editor.html index d4ca7de..25c666a 100644 --- a/www/editor.html +++ b/www/editor.html @@ -19,9 +19,9 @@

  • CTRL + E to move cursor to enf of line
  • CTRL + T to move cursor to begining of file
  • CTRL + B to move cursor to enf of file
  • -
  • CTRL + d to cut (delete) a line
  • -
  • CTRL + y to copy (yank) a line
  • -
  • CTRL + p to paste (put) a line
  • +
  • CTRL + D to cut (delete) a line
  • +
  • CTRL + Y to copy (yank) a line
  • +
  • CTRL + P to paste (put) a line
  • diff --git a/www/filesystem.html b/www/filesystem.html index c15edac..3641176 100644 --- a/www/filesystem.html +++ b/www/filesystem.html @@ -126,8 +126,8 @@ alloc = number of allocated blocks

    File

    -

    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.

    +

    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.

    If all contents can fit into one block the address of the next block will be empty.

    diff --git a/www/lisp.html b/www/lisp.html index c87c166..8a70384 100644 --- a/www/lisp.html +++ b/www/lisp.html @@ -119,7 +119,7 @@ of the Shell.

    The interpreter can be invoked from the shell:

    > lisp
    -MOROS Lisp v0.5.0
    +MOROS Lisp v0.7.0
     
     > (+ 1 2 3)
     6
    @@ -194,64 +194,9 @@ with the following content:

    Changelog

    -

    0.1.0 (2021-07-21)

    - -

    MOROS Lisp started from 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. 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
    • -
    +

    0.7.0 (2023-12-22)

    @@ -265,7 +210,64 @@ language and reading from the filesystem.

  • 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. 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 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.

    diff --git a/www/manual.html b/www/manual.html index 34a7837..e17a403 100644 --- a/www/manual.html +++ b/www/manual.html @@ -51,8 +51,7 @@ memory size, processor, devices, network cards, disks, and the real time clock.< commands to test the system or install to setup the filesystem on a disk:

    -
    MFS is not mounted to '/'
    -Running console in diskless mode
    +    
    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 /ini/boot.sh to logi
     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

    @@ -202,10 +218,11 @@ tilde ~ means that you are in your home directory:

    Usage: list <options> [<dir>] Options: - -a, --all Show dot files - -n, --name Sort by name - -s, --size Sort by size - -t, --time Sort by time + -b, --binary-size Use binary size + -a, --all Show dot files + -n, --name Sort by name + -s, --size Sort by size + -t, --time Sort by time

    You can write a directory in the disk with write:

    @@ -246,7 +263,7 @@ content to the file and ^Q to quit the editor and go back to the sh

    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
    @@ -292,8 +309,8 @@ file:

    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
    @@ -382,6 +399,14 @@ Hello, World!
         <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
     
    diff --git a/www/network.html b/www/network.html index ca15ae9..b809c42 100644 --- a/www/network.html +++ b/www/network.html @@ -83,7 +83,7 @@ dns: 10.0.2.3

    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) *
     
    diff --git a/www/shell.html b/www/shell.html index eef7adf..fb40b80 100644 --- a/www/shell.html +++ b/www/shell.html @@ -33,7 +33,6 @@ additional common aliases.

    Delete file:

    > d a.txt
    -> del a.txt
     > delete a.txt
     
    @@ -80,7 +79,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