Commit Graph

79 Commits

Author SHA1 Message Date
Vincent Ollivier f6b8946b37
Publish version 0.10.2 (#599)
* Update changelog

* Update version number

* Update copyright year

* Update website

* Reorder changelog

* Recompile userspace binaries

* Update changelog

* Update screenshot
2024-03-20 15:44:46 +01:00
Vincent Ollivier 6175fae3f0
Update Rust from nightly-2023-12-01 to nightly-2024-03-01 (#598)
* Update Rust from nightly-2023-12-01 to nightly-2024-03-01

* Run clippy

* Update binaries
2024-03-16 14:12:21 +01:00
Vincent Ollivier 5ca0894241
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
2024-03-15 19:08:10 +01:00
Vincent Ollivier 699ddf0ad8
Add time synchronisation with NTP (#579)
* Add api::time::from_timestamp_utc function

* Add date function to lisp

* Add file/exists? function to lisp

* Rewrite lisp ntp client

* Update NTP packet to work with more servers

* Fix userspace binaries build
2024-02-18 21:41:03 +01:00
Vincent Ollivier c5dc33dafb Fix palette init 2024-01-18 22:19:50 +01:00
Vincent Ollivier a9eb6f9c21
Add ANSI OSC color palette support (#566)
* Refactor vga palette code

* Add osc dispatch to handle ansi palette

* Add warning macro

* Deprecate vga set palette command

* Add shell script to set palettes

* Remove TODO

* Add new TODO comments

* Add reset sequence

* Add cursor edge checks
2024-01-09 00:18:47 +01:00
Vincent Ollivier 362e905990
Publish version 0.10.2 (#562)
* Bump MOROS version to 0.10.2

* Update changelog

* Bump lisp to 0.7.0

* Update documentation

* Add links to PRs in changelog

* Add missed version bumps in doc

* Update screenshot

* Update some binaries
2023-12-22 11:52:47 +01:00
Vincent Ollivier 82bc08ed96
Add number->string function to lisp (#561)
* Add number->string function

* Add alias

* Add documentation
2023-12-19 22:51:13 +01:00
Vincent Ollivier 9f525990a5
Improve Lisp with Advent of Code 2023 🎄 (#556)
* Add contains? to Lisp

* Use ls everywhere instead of lst

* Rename system command to shell

* Exec '/ini/lisp.lsp' at startup

* Check if init file exist

* Add missing lisp init file

* Remove contains?

* Add empty? function

* Add reject? function

* Update doc

* Add dict type to Lisp

* Add push function

* Add binary literals to doc

* Move push function from primitive to core lib

* Update lisp doc

* Add escape character to parser

* Add backspace to parser

* Update doc

* Add host function

* Fix regex.match?

* Test if and while for truthiness instead of comparing with true

* Add tests for empty string and 0

* Mention truthiness in changelog

* Check for unspecified IPv4 in usr::host::resolv

* Transform host error into nil

* Update ntp.lsp to support hostnames

* Fix typo

* Fix escape display

* Use '/' instead of '.' as namespace separator

* Add doc.lsp

* Fix comment color

* Update changelog
2023-12-17 17:24:55 +01:00
Vincent Ollivier 525b1dcca3
Upgrade toolchain from 2023-05-01 to 2023-12-01 (#559)
* Upgrade toolchain from 2023-05-01 to 2023-12-01

* Remove redundant call

* Rebuild binaries

* Remove redundant redefinition of a binding
2023-12-17 17:24:23 +01:00
Vincent Ollivier d22c504726
Improve system information (#553)
* Add socket command to manual

* Update syscall doc

* Update copyright year in help command

* Fix lisp include

* Fix error styling in shell

* Use uppercase hex

* Update website

* Move some CSI color positions

* Update line-height
2023-12-01 16:51:02 +01:00
Vincent Ollivier 419001cc26
Add basic userspace shell (#548)
* Increase MAX_PROCS to 4

* Check MAX_PID before creating a process

* Remove id from Process::new()

* Add parent_id to Process

* Add exec command

* Avoid freeing outside of the heap

* Add debug output

* Disable free operation

* Add args to exec commands

* Fix warning

* Include exec binary

* Revert cmd split

* Add disabled debug output for some syscalls

* Remove undocumented proc command

* Disable exec and hello install
2023-11-21 09:26:19 +01:00
Vincent Ollivier b4b3b0f425
Add basic userspace allocator (#544)
* Add userspace allocator

* Fix demo

* Return from userspace exceptions

* Add failing test

* Add allocator to process struct

* Update binaries

* Update binaries again

* Fix stack address

* Fix heap size

* Move up debug output in free syscall
2023-11-20 20:44:05 +01:00
Vincent Ollivier 02c1b7f52a
Improve documentation (#547)
* Update readme

* Add hardware page

* Add contributing page

* Update changelog

* Update contributing

* Update index

* Add games page

* Move images to doc/images

* Rebuild website

* Fix dsk/var/www

* Update contributing

* Change games order
2023-11-19 21:03:10 +01:00
Vincent Ollivier b77e886748
Add more code examples to lisp (#542)
* Add ntp client

* Add ntp to install

* Add fetch example
2023-11-17 10:08:47 +01:00
Vincent Ollivier f806c3a338
Add namespaces to lisp (#511)
* Add file module

* Add r and t literals

* Add string support in contains

* Add number, string, and regex modules

* Fix tests

* Fix lib

* Fix split in lib

* The % operator is for remainder instead of modulo

* Rename internal binary functions

* Add mod and rem and alias % to the latter

* Use dot instead of colon for namespacing

* Rename *-file* functions

* Update www

* Update changelog
2023-07-02 09:20:49 +02:00
Vincent Ollivier 86a8319515
Publish release 0.10.0 (#507)
* Regenerate www for lisp doc

* Update example email address

* Fix changelog

* Rewrite old changelog as list

* Update changelog

* Update version

* Add links to changelog

* Fix links

* Add date to lisp changelog

* Fix banner for longer version number

* Update screenshot

* Regenerate www

* Remove boot.png

* Update lisp version to 0.5.0

* Update chess version to 0.2.0

* Add screenshot script
2023-06-21 20:17:54 +02:00
Vincent Ollivier 8afef1bf2f
Fix lisp range params (#494)
* Fix lisp range params

* Update changelog
2023-06-14 00:04:13 +02:00
Vincent Ollivier b1d7a1f929
Add docstring to lisp (#490)
* Add docstring to lisp

* Add expected macro

* Add could_not macro

* Improve naming conventions

* Refactor code

* Add env function

* Update changelog
2023-05-29 10:15:11 +02:00
Vincent Ollivier 7665c11a9a
Fix RTL8139 driver issues (#483)
* Fix typo in rx buffer size

* Fix issue with small packets tx

* Change tx buffer len

* Fix tx ring overflow

* Use 1024 bytes for max DMA burst size

* Use spin_loop

* Add atomic fence before polling for status change

* Disable interrupts

* Update device capabilities

* Fix http service

* Update /var/www

* Refactor buf len

* Update changelog
2023-05-05 23:14:42 +02:00
Vincent Ollivier 2f7f33b950
Improve help system (#481)
* Rename shortcut to command in help

* Add dir arg to list usage

* Add help to read command

* Add help to write command

* Add help to date command

* Add manual

* Add help to copy

* Add help to delete

* Add help to dhcp

* Add help to edit

* Add elf command to autocomplete

* Update boot in manual

* Add help to elf

* Add help to env

* Add help to help

* Add help to hex

* Add help to lisp

* Add help to move

* Add help to shell

* Refactor user help

* Update crates

* Improve debug

* Update binaries

* Increase user process memory space

* Exit process before shutdown

* Add more content to manual

* Update manual

* Update screenshots

* Update index.md

* Add link to the manual

* Update shields in readme

* Add links to the manual

* Add games to README

* Rewrite the first part of the index

* Remove a word

* Rewrite usage section

* Add demo section

* Rewrite part of the doc

* Remove html files

* Add make website command

* Commit html files

* Fix indentation

* Fix code block

* Add monitor option to qemu to take screenshots

* Update CSS

* Fix CSS

* Add font-family sans-serif to website
2023-04-27 19:34:05 +02:00
Vincent Ollivier 4d50eae287
Refactor lisp functions (#478)
* Refactor function names

* Rename list_of_xs into xs

* Rename bytes to binary

* Fix failing tests

* Update changelog

* Remove legacy functions
2023-04-22 15:46:05 +02:00
Vincent Ollivier fcab94a804
Improve asm binaries (#482)
* Implement clear in asm

* Implement halt in asm

* Add sleep to halt

* Move newline after color reset

* Add unimplemented print and sleep

* Compute msg len

* Update changelog
2023-04-21 21:06:15 +02:00
Vincent Ollivier 72ea9c14c2
Add light palette (#480)
* Add light palette

* Fix broken test

* Update changelog
2023-04-16 15:38:05 +02:00
Vincent Ollivier 5251bae1d3
Improve lisp (#455)
* Replace car and cdr builtins with head and tail

* Add nth function

* Reorder core functions

* Rename uniq to unique

* Add list test

* Update doc

* Update examples

* Remove abs definition from example

* Fix tests

* Fix rest
2022-12-16 22:03:02 +01:00
Vincent Ollivier 87eb51d1ff
Improve lisp (#449)
* Add sort function

* Add slice function

* Fix empty string conversion into number

* Fix failing test

* Update test memory in makefile

* Add string to slice

* Add string to length

* Replace builtin lines with split and trim

* Fix splitting on empty pattern

* Fix slice for strings

* Add uniq

* Refactor slice

* Refactor sort to accept any expression

* Add contains?

* Add chunks

* Split default_env

* Add filter and intersection to core lib

* Update doc

* Update set to return value instead of symbol

* Add splice for variadic functions
2022-12-12 18:43:51 +01:00
Vincent Ollivier 8670bf0b6e
Improve help (#451)
* Replace goto with dir shortcut

* Update wording

* Add find to help
2022-12-10 16:37:48 +01:00
Vincent Ollivier be6ca0c744
Replace some rust programs with lisp scripts (#445)
* Replace colors command with colors.lsp

* Replace geotime command with geotime.lsp

* Remove commands from shell

* Add comment
2022-11-30 23:27:15 +01:00
Vincent Ollivier 3be0a0c9a5
Add path to prompt (#444)
* Add path to prompt

* Change tilde position in font

* Update moros.png
2022-11-28 23:21:05 +01:00
Vincent Ollivier d09e2aff30
Reduce filesizes (#430)
* Run strip on binaries

* Run oxipng on image
2022-11-01 18:40:47 +01:00
Vincent Ollivier ab9b488a49
Update lisp doc and examples (#428)
* Update documentation

* Add macro?

* Rewrite and and or with macros

* Move string-join

* Update built-in autocompletion

* Use define instead of def in core and examples

* Add changelog to doc

* Move aliases to lib

* Add let macro

* Add caar cadr cdar cddr functions

* Add fixme

* Fix let macro
2022-11-01 11:02:50 +01:00
Vincent Ollivier 0037e24961
Add macro to Lisp (#425)
* Add expand to lisp

* Update tests

* Add quasiquote and unquote

* Rename Lambda into Function

* Add macro

* Fix function_env

* Dry code

* Add define-macro shortcut

* Add mac shortcut

* Refactor inner env

* Move expand to a module

* Add unquote-splicing

* Fix test

* Refactor tests

* Add function args symbol

* Fix typo

* Remove old append

* Add dotted pair

* Revert "Add dotted pair"

This reverts commit 10544b56d8.
2022-10-28 18:43:22 +02:00
Vincent Ollivier 0a29f533b2
Add TCO to Lisp (#420)
* Add TCO to Lisp

* Add sum.lsp

* Fix tests

* Refactor code

* Run clippy

* Use tmp var

* Refactor tmp

* Replace Lambda Rc by Box Lambda

* Remove exp clone

* Run clippy

* Remove another exp clone

* Reorder matches

* Remove another clone

* Run clippy

* Remove to_vec

* Add comments
2022-10-24 10:44:17 +02:00
Vincent Ollivier fcf3a7e72f
Add if and while to Lisp (#418)
* Change Lisp loop into while

* Rename define to def

* Replace cond by if

* Fix pi computation

* Fix number parsing error

* Fix or function

* Add test to while

* Rewrite test

* Add missing fun

* Add examples to doc
2022-10-21 10:10:14 +02:00
Vincent Ollivier 892b697bd3
Add BigInt support to Lisp (#415)
* Add bigint support to Lisp

* Remove Box

* Replace BigInt by i64

* Add back big int

* Work around big int errors

* Print floats with a dot

* Add conversion to f64

* Use Number#parse instead of double

* Add trigo functions to Number

* Add conversion from number to byte

* Add addition to Number

* Add multiplication to Number

* Add negation and substraction to Number

* Add division to Number

* Add reminder to Number

* Add pow to Number

* Fix tests

* Re-enable BigInt

* Add parsing and printing of BigInt

* Add sign

* Add operations on BigInt

* Fix compilation issues

* Add support for add and mul overflow

* Fix bigint conversion to and from str

* Add number-type function

* Add tests

* Add support for pow overflow

* Fix tests

* Add more checks for overflow

* Add check for division by zero

* Fix typo

* Return inf for large exponential operations

* Check for division by zero in modulo

* Add shift operations

* Rewrite comparisons

* Add lazy eval to cond expressions

* Add set fonction

* Add loop function

* Add pi example

* Add builtin pi example to shell

* Update allocation error messages

* Rewrite number conversions

* Remove debug output from pi example

* Move pi command to a dedicated file

* Rewrite bytes->number and number->bytes

* Update doc

* Move op impl to Number

* Add macros to dry code

* Add more macros

* Run clippy
2022-10-17 20:58:08 +02:00
Vincent Ollivier ec57ff1540
Extend and refactor Lisp implementation (#412)
* Adopt a syntax closer to scheme

* Add parse and eval

* Replace Exp::Func with Exp::Primitive

* Refactor built in autocompletion

* Replace null by nil

* Fix test

* Update doc

* Bump version
2022-09-20 19:57:55 +02:00
Vincent Ollivier 1bafa2271c
Add apply to Lisp (#410)
* Replace mapcar by apply

* Add map and reduce to core lib

* Add pi.lsp example

* Fix tests

* Refactor pi-digits

* Move builtin join to core lib as string-join

* Rename decode-* and encode-* to *-decode and *-encode

* Update doc
2022-09-15 20:50:23 +02:00
Vincent Ollivier 5109608ea3
Add Conway's Game of Life (#409)
* Add the Game of Life

* Add seed interval

* Add option to load seed from file

* Add speed option

* Add a status bar at the bottom of the screen

* Refactor rules computation

* Refactor printing

* Add life to autocomplete list

* Fix autocomplete size

* Refactor file loading

* Add centinal.cells

* Add more cells files

* Add ^C to text editor

* Remove -f option

* Remove two patterns

* Remove extra newlines

* Remove code for comments

* Center cells
2022-09-10 10:57:55 +02:00
Vincent Ollivier 1e8f9e357d
Exit from alloc errors after page fault in userspace (#404)
* Add debug mode to makefile

* Add page fault exit code

* Fix panic

* Remove warning

* Display error message only in user mode

* Disable debug

* Use alloc conditionally in hello command

* Use standardized style of error message for page fault

* Remove debuginfo from userspace binaries

* Add comment to the page fault issue

* Use default relocation model instead of static

* Refactor import

* Update binaries

* Fix panic info by using debug

* Refactor makefile comment
2022-09-03 15:36:53 +02:00
Vincent Ollivier 55531b9e3d
Improve Lisp forms (#402)
* Use x and y variables instead of a and b

* Rewrite not form

* Move boolean forms to core lib

* Handle special arithmetic cases

* Add range form

* Add pr and prn for print and println

* Add more tests to cond
2022-09-03 15:27:52 +02:00
Vincent Ollivier 0724b5a07b
Move /ini/lisp to /lib/lisp (#398) 2022-08-27 13:07:32 +02:00
Vincent Ollivier b11f0aeb96
Add new forms to lisp (#385)
* Add decode-float and encode-float forms

* Add uptime form

* Add write-bytes form

* Add list form

* Add new forms to move print to core lib

* Rename file io forms

* Update doc

* Merge cat into string

* Rename *code-float to *code-number

* Add write-file and append-file forms

* Add doc about the core library

* Add regex-find

* Add not

* Add regex-match

* Update doc

* Bump lisp version

* Add realtime

* Update doc
2022-08-25 08:48:19 +02:00
Vincent Ollivier dbe75aa9d8 Publish version 0.8.0 2022-08-05 18:09:38 +02:00
Vincent Ollivier 78756bb94e
Add Brautigan poem (#373) 2022-08-01 21:28:28 +02:00
Vincent Ollivier 3789a10df6
Improve lisp (#362)
* Parse empty strings

* Add append to core

* Add reverse to core

* Add read-line to core

* Remove prompt from read-line

* Change print return value

* Fix read-line

* Add trigonometric functions

* Update documentation

* Setup autocompletion semi-automatically
2022-07-02 15:24:30 +02:00
Vincent Ollivier e4ce2ab59c
Use exit code to set status var (#360)
* Use exit code

* Add macro_use to sys module

* Replace ExitCode with Result<usize, usize>

* Add status var

* Fix status code

* Replace status with ?

* Fix regex for var substitution

* Remove warnings

* Add temporary fix for failing tests

* Add q shortcut to calc

* Use usize for exit code

* Use process exit codes

* Reintroduce ExitCode enum

* Use ExitCode::UsageError where needed

* Display usage error in find command

* Add doc
2022-06-29 19:23:01 +02:00
Vincent Ollivier 82882ec355
Add shell aliases (#357)
* Add shell aliases

* Fix env output error

* Fix sort

* Read aliases from config file

* Simplify arguments parsing

* Fix test

* Clone params to spawn syscall

* Run clippy

* Revert "Clone params to spawn syscall"

This reverts commit 4c91bea196.

* Disable binary stripping

* Remove exit alias

* Update doc
2022-06-26 10:00:54 +02:00
Vincent Ollivier dd5899a74d
Read command line args from userspace programs (#351)
* Read command line args from userspace programs

* Use Stop syscall to debug pointers from userpace

* Fix address translation system

* Update binaries

* Move print to bin

* Add hardcoded alias system

* Strip debug from binaries

* Build userspace binaries before running tests

* Save all the args in args including the command invocation name

* Move sleep command to /bin

* Rebuild binaries
2022-06-14 22:43:33 +02:00
Vincent Ollivier 6e3f3afcb0
Add binaries (#350)
* Remove linker args

* Add binaries

* Read /bin for autocomplete

* Add /bin path to commands

* Remove api bin

* Remove usr reboot
2022-06-12 15:28:54 +02:00
Vincent Ollivier b2da75189f
Improve Lisp (#344)
* Add println

* Rewrite fib

* Refactor parse

* Update lisp completer

* Store args in env

* Add 'or' and 'and' builtins

* Add factorial.lsp

* Update docs

* Add cat operation

* Add join operation

* Add system command

* Add time command (#346)

* Add time command

* Fix merge artefact

* Fix call to realtime

* Replace clock syscalls with device files (#345)

* Replace clock syscalls with device files

* Add missing newline to read

* Update time command

* Use Rc<RefCell<Env>>

* Add first TCO

* Remove Box

* Change result of env_for_lambda

* Run clippy

* Remove env clone

* Remove TCO

* Change return type of env_for_lambda
2022-06-06 16:02:34 +02:00