Commit Graph

30 Commits

Author SHA1 Message Date
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 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 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 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 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 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 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 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 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 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 313f90ee73
Extend lisp language (#278)
* Add map builtin

* Rename ensure_length macro

* Update documentation

* Update map function

* Rename map to mapcar

* Add modulo to calculator

* Add division, modulo, and exponential to lisp

* Add type to built in functions

* Add string comparisons

* Update atom function

* Add basic load function

* Update load to parse multiple expressions

* Escape quote in string display

* Move print definition

* Rename read-file to read

* Simplify mapcar implementation

* Update tests

* Add comment and test

* Add standard library

* Add lib to install

* Refactor eval

* Refactor eq

* Refactor eval with ensure macros

* Add more tests

* Redefine primitives

* Move primitives to /ini/lisp/core.lsp

* Update install file

* Refactor eval

* Create /ini/lisp
2021-12-12 11:43:57 +01:00
Vincent Ollivier e5a7b63bc2
Add chess game (#230)
* Add chess game

* Add missing file

* Add moves parsing

* Add autocompletion

* Add perft command to chess

* Update Cargo.lock

* Add undo and time commands

* Improve output of commands

* Add endgame support

* Split main into multiple methods of a Chess struct

* Update littlewing

* Use chess prelude

* Add show board command

* Add help

* Update docs

* Fix url syntax in doc

* Add commands to doc index

* Update doc/index.md

* Fix typos
2021-08-12 23:15:28 +02:00
Vincent Ollivier 8af428beab
Add Lisp interpreter (#207)
* Add lisp interpreter

* Refactor lisp code

* Add copyright notice

* Add multiplication

* Shorten type names

* Remove print import

* Add tests

* Add tests for def and fn

* Add print builtin

* Add file eval

* Add fib.ls

* Use define and lambda instead of def and fn

* Rewrite the primitive operators

* Update fibonacci example

* Add syntactic sugar for quote

* Rename console::abort to console::end_of_text

* Add console::end_of_transmission

* Remove auto parenthesis

* Fix parsing quotes

* Refactor quote primitive

* Add empty list comparison to eq primitive

* Add defun primitive

* Rename example

* Fix install path

* Add doc

* Add eq? and atom? aliases
2021-07-21 09:40:40 +02:00