Commit Graph

79 Commits

Author SHA1 Message Date
Vincent Ollivier 2b91c9ccc7
Add e1000 driver (#337)
* Add e1000 network card support

* Read MAC from EEPROM

* Read MAC without EEPROM

* Add device id for ThinkPad X200

* Fix makefile merge

* Add todo list

* Add WIP implementation

* Add qemu trace to makefile

* Rewrite parts of the implementation

* Fix descriptor cloning

* Return received buffer

* Break from loop when transmitted

* Comment out debug code

* Comment out more code

* Rename allocator variables

* Fix debug issue

* Add more device ids

* Reset RxDesc status when done

* Process packet even if ICR_RXT0 is set

* Remove debug output

* Refactor code

* Fix typo

* Fix RDT updates

* Update documentation

* Update makefile to match doc

* Group network cards in readme

* Refactor code

* Avoid using ICR to check for new packets

* Fix panic on invalid datagram size

* Refactor code to stay below 80 chars

* Increase buffer size

* Add FIXME to test for EOP

* Clean up code

* Add PCI id for I217-LM

* Update hardware page

* Add PCI id for the Intel PRO/1000 GT

* Update hardware page

* Fix init_tx for Intel I217-LM

* Refactor comments

* Update website

* Fix whitespace

* Update doc for VirtualBox

* Reorder cards in doc

* Reorder cards in doc

* Restore signal

* Move makefile trace option to qemu

* Add ThinkCentre M83 to hardware list

* Increase receive buffer back to 64

* Refactor reset

* Print MAC address in uppercase

* Disable interrupts

* Add TODO comment
2024-04-08 15:23:40 +02:00
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 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 acd213b5cc
Add timeout to socket accept (#584)
* Add timeout to socket accept

* Fix doc
2024-02-25 09:48:35 +01:00
Vincent Ollivier 334425b925 Fix typo 2024-01-23 21:23:02 +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 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 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 96b20dfb51
Add support for hexadecimal numbers in Lisp (#540)
* Add support for hexadecimal numbers in lisp

* Add source in comment

* Add support for 0X

* Add doc

* Remove extra space in doc

* Remove plural

* Add negative number to doc

* Update doc

* Fix typo

* Add ntp client

* Add ntp to install

* Remove ntp code
2023-11-17 10:08:25 +01:00
Vincent Ollivier a82c87c61c Publish version 0.10.1 2023-09-23 09:09:31 +02:00
Vincent Ollivier b606c064c6
Add network syscalls (#512)
* Add connect syscall

* Add tcp socket device

* Add socket.connect to lisp

* Rewrite tcp command to use the syscalls

* Rewrite http command to use the syscalls

* Use socket#recv_slice instead of socket#recv

* Move connect to net module

* Refactor connect

* Refactor code

* Add listen syscall

* Add accept

* Add close to FileIO

* Fix write loop

* Add poll syscall

* Rewrite socket command to use poll

* Update console polling

* Rename file handle to handle

* Remove prompt option from socket

* Make poll blocking with timeout and cancel

* Add one byte status read

* Remove poll blocking

* Fix error when connect is followed directly by close

* Change tcp and socket command arguments

* Add sleep while polling without events

* Speed up connection failure detection

* Add back some verbose output

* Fix socket listen

* Split net files

* Add UDP sockets

* Refactor host command code

* Move shared socket code to module

* Use recommended buffer size in socket file size

* Remove debug output

* Fix fallback socket size

* Update html doc

* Update network screenshot

* Update lisp manual
2023-07-29 16:24:45 +02:00
Vincent Ollivier 5003296c30 Fix lisp doc 2023-07-03 09:28:37 +02:00
Vincent Ollivier 111933fafc Add missing aliases 2023-07-02 09:34:01 +02: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 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 9c850e108b
Add full support for comments in MOROS Lisp (#489)
* Add full support for Lisp comments

* Update changelog

* Update doc
2023-05-24 23:20:54 +02:00
Vincent Ollivier 1396d7c8d2 Fix typo 2023-04-28 22:39:02 +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 49c207dd8b
Add cut/copy/paste to editor (#456)
* Add cut command

* Add paste command

* Add copy command
2022-12-16 22:08:50 +01: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 731ac18640 Update main screenshot 2022-11-29 04:34:14 +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 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 d5c0002f6d
Update shell redirections (#399)
* Update shell redirections

* Allow file truncation during redirection

* Print time output to stderr
2022-08-28 17:26:38 +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 e0596f9f77
Add file append (#387)
* Add file append

* Fix off by one error

* Use append in reopen for shell redirections

* Add documentation

* Update tests
2022-08-14 01:12:52 +02:00
Vincent Ollivier 79682d2302
Add tilde expansion to shell (#367)
* Add tilde expansion to shell

* Add tilde expansion to auto complete

* Move tilde expansion into split_args

* Add doc
2022-07-10 22:00:13 +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 783a41981d
Add shell globbing (#352)
* Add naive implementation

* Add support for multiple files in delete command

* Update find usage

* Ignore quoted params

* Add doc

* Change argument name
2022-06-16 21:29:45 +02:00
Vincent Ollivier 0831045c64
Add shell variables (#348)
* Add env vars to shell

* Add shell env

* Rename shell::run to shell::repl

* Add script pathname to shell env

* Add shell variables

* Add test

* Add doc

* Fix doc
2022-06-08 20:51:02 +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
Vincent Ollivier 28759df00c
Replace clock syscalls with device files (#345)
* Replace clock syscalls with device files

* Add missing newline to read

* Update time command
2022-06-05 13:58:05 +02:00
Vincent Ollivier 530658221d
Add socket command (#341)
* Add socket command

* Add test.html page

* Refactory sending code

* Update documentation

* Fix newlines

* Add interval option

* Replace newlines

* Exit on end of transmission

* Add listen mode

* Fix arguments parsing

* Remove debug output
2022-05-21 10:46:16 +02:00
Vincent Ollivier 18bfaf93d7
Add a reboot command (#328)
* Add a reboot command

* Add STOP syscall

* Add ctrl-alt-del reboot keys

* Add comment to keyboard shortcut
2022-04-12 09:55:53 +02:00
Vincent Ollivier 946ea95ff0
Refactor network commands (#322)
* Change debug color

* Rewrite net command

* Update doc

* Add dhcp --verbose

* Remove ip and route commands

* Align command outputs

* Adjust colors

* Use system dns if available with host command

* Add error macro

* Display network error

* Use error macro

* Fix broken test

* Update dir listing color

* Update syscall doc

* Use error macro in more commands
2022-04-10 09:27:12 +02:00
Vincent Ollivier 3bef35b707
Upgrade smoltcp (#293)
* Upgrade smoltcp

* Fix issues

* Add back net monitor

* Update doc

* Fix net command help
2022-04-05 13:03:55 +02:00
Vincent Ollivier 9708796976
Add directory support to userspace (#303)
* Create dirs from userspace

* Add delete syscall

* Add name to FileStat

* Add offset to Dir

* Add dynamic size to dir

* Add FileStat (de)serializer

* Add ReadDir#block_index

* Add FileStat::root

* Implement FileIO#read for Dir

* Add api::fs::read_dir

* Use read_dir for list command

* Allow read /path/to/dir/ commands

* Save dir size to dir entry

* Fix return value of api::fs::create_device

* Read dir from userspace

* Add proc command

* Close file handle when creating dir

* Add /dev/null

* Remove path restriction

* Allow listing of singular file

* Update doc

* Re-export fs struc in API

* Use read_dir in shell autocomplete

* Use fs::delete in httpd

* Rename stat to info

* Update doc

* Rename attributes
2022-01-18 08:44:10 +01:00