diff --git a/.gitignore b/.gitignore index ab21d4a..f6b9e46 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ ml .DS_Store CMakeFiles Testing +.cache diff --git a/Readme.md b/Readme.md index aa86d4c..9d83a19 100644 --- a/Readme.md +++ b/Readme.md @@ -78,7 +78,7 @@ utils/local_install.sh - execute system command should capture stderr - add mem stats to benchmark - order of arguments in functions like member and filter - filter swap lambda and list -- better output of !e in repl +- better output of !e in repl (resp !e !ee) #### Doc - fix an error in printing multiline examples in doc diff --git a/stdlib/stdlib.lsp b/stdlib/stdlib.lsp index aa8837d..b157b49 100644 --- a/stdlib/stdlib.lsp +++ b/stdlib/stdlib.lsp @@ -252,7 +252,7 @@ nil (do (def minn (index l 0)) - (def i 1) + (def i 1) (while (< i (len l)) (if (< (index l i) minn) (set! minn (index l i))) diff --git a/tmp/html_scrap.lsp b/tmp/html_scrap.lsp new file mode 100644 index 0000000..9b631ef --- /dev/null +++ b/tmp/html_scrap.lsp @@ -0,0 +1,15 @@ + +;read file +(define web (read-file "/tmp/finviz_quote_syf.html")) +(print "file read") + +; remove head section +(define pos (string-find web "((.|\r?\n)*?)" "")) + +; extract tables + +(print web3) diff --git a/utils/Lisp.tmLanguage b/utils/Lisp.tmLanguage index 75bb90c..c263176 100644 --- a/utils/Lisp.tmLanguage +++ b/utils/Lisp.tmLanguage @@ -136,13 +136,13 @@ match - (?<=\()(?i:\*|\*\*|\*\*\*|\+|\+\+|\+\+\+|\-|/|//|///|/=|1\+|1\-|<|<=|=|>|>=|if|cond|do|for|while|scope|quote|defn|and|or|set!|eval|type|parse|list|insert|index|remove|len|push|pop|head|tail|first|last|range|map|filter|reduce|exit|quit|print|input|random|include|read-file|read-file-lines|write-file|read-url|system-cmd|ls-dir|is-file?|is-dir?|tcp-server|tcp-client|parse-csv|parse-json|get-universal-time|date-to-str|str-to-date|date-add|debug|sprintf|display|string-replace|string-replace-re|string-regex?|string-regex-list|string-split|string-pad|string-rltrim|string-case|string-len|string-substr|string-find|benchmark|thread-create|thread-under-lock|thread-sleep|threads-join|try|throw|usql|first|second|third|fourth|fifth|sixth|seventh|eight|nth|print|get-universal-time|not|is-pos?|is-neg?|neg|dec|inc|string-ltrim|string-rtrim|string-trim|string-rpad|string-lpad|string-upcase|string-downcase|string-join|itok|ktoi|sleep|get-env|member|make-list-of|make-list|empty-list?|uniq|flatten|quick-sort-by|quick-sort|quick-sort-reverse|start-of-day|end-of-day|start-of-month|start-of-next-month|end-of-next-month|end-of-month|start-of-prev-month|end-of-prev-month|start-of-year|end-of-year|make-csv)(?=\s+) + (?<=\()(?i:\*|\*\*|\*\*\*|\+|\+\+|\+\+\+|\-|/|//|///|/=|1\+|1\-|<|<=|=|>|>=|if|cond|do|for|while|scope|quote|and|or|set\!|eval|type|parse|list|insert|index|remove|len|push|pop|head|tail|first|last|range|map|filter|reduce|exit|quit|print|input|random|include|read-file|read-file-lines|write-file|read-url|system-cmd|ls-dir|is-file?|is-dir?|tcp-server|tcp-client|parse-csv|parse-json|get-universal-time|date-to-str|str-to-date|date-add|debug|sprintf|display|string-replace|string-replace-re|string-regex?|string-regex-list|string-split|string-pad|string-rltrim|string-case|string-len|string-substr|string-find|benchmark|thread-create|thread-under-lock|thread-sleep|threads-join|try|throw|usql|first|second|third|fourth|fifth|sixth|seventh|eight|nth|print|get-universal-time|not|is-pos?|is-neg?|neg|dec|inc|string-ltrim|string-rtrim|string-trim|string-rpad|string-lpad|string-upcase|string-downcase|string-join|itok|ktoi|sleep|get-env|member|make-list-of|make-list|empty-list?|uniq|flatten|quick-sort-by|quick-sort|quick-sort-reverse|start-of-day|end-of-day|start-of-month|start-of-next-month|end-of-next-month|end-of-month|start-of-prev-month|end-of-prev-month|start-of-year|end-of-year|make-csv)(?=\s+) name keyword.control.lisp match - (?<=^|\s|[()])(?i:nil|t)(?=$|\s|[()]) + (?<=^|\s|[()])(?i:nil|\#t)(?=$|\s|[()]) name constant.language.lisp diff --git a/utils/local_install.sh b/utils/local_install.sh index 3dc825f..4bd8198 100755 --- a/utils/local_install.sh +++ b/utils/local_install.sh @@ -19,8 +19,6 @@ mv ./ml /usr/local/bin/ml echo "" echo "if syntax has changed you may use" echo "cp utils/Lisp.tmLanguage ~/.vscode/extensions/mattn.lisp-0.1.12/syntaxes/" -echo "or" -echo "cp utils/Lisp.tmLanguage ~/.vscode/extensions/mattn.lisp-0.1.12/syntaxes/" echo "" ml -v