https://github.com/vindarel/cl-whosetests
Experiments that go in other resources and projects
https://github.com/vindarel/cl-whosetests
Last synced: 5 months ago
JSON representation
Experiments that go in other resources and projects
- Host: GitHub
- URL: https://github.com/vindarel/cl-whosetests
- Owner: vindarel
- Created: 2018-02-01T00:38:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-03-03T22:11:24.000Z (over 6 years ago)
- Last Synced: 2025-04-05T22:29:11.564Z (about 1 year ago)
- Language: Common Lisp
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
whosconnected
Personal tries for an interactive prompt.
We use [replic](https://github.com/vindarel/replic) to ease the building of the readline repl.
```common-lisp
(setf replic:*prompt* (cl-ansi-text:green "whosconnected > "))
;; Create the completions bindings.
(replic:init-completions)
;; create commands from the exported functions and variables.
(replic:functions-to-commands :clwhosconnected)
;; run the repl
(replic:repl))
```
Lessons learned transfered to:
* https://lispcookbook.github.io/cl-cookbook/web-scraping.html
* https://lispcookbook.github.io/cl-cookbook/scripting.html
* https://github.com/vindarel/replic (inheriting and factoring ideas from here, to build custom readline programs)
* https://github.com/vindarel/cl-readline-example
We use [cl21](https://lispcookbook.github.io/cl-cookbook/cl21.html).
Specially cool for quick lambdas:
~~~lisp
(defun titles2url (titles)
"From a list of user names, give back the full url."
(map ^(str:concat *base-url* %) titles))
~~~
and [str](https://github.com/vindarel/cl-str).