Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lparallel overhaul #16

Open
wants to merge 50 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
aa97b98
package: Fix typo in *debug-on-error* docstring.
Ambrevar Apr 27, 2023
2503dd8
package: Add lpara nickname.
Ambrevar Apr 27, 2023
00839a0
Replace Calispel with Lparallel.
Ambrevar Apr 28, 2023
4e3132b
gitmodules: Remove Calispel.
Ambrevar Apr 28, 2023
7450455
prompter.asd: Remove Calispel.
Ambrevar Apr 28, 2023
558264e
tests: Move to Lparallel API.
Ambrevar Apr 28, 2023
c9c24b4
README: Add Roadmap section.
Ambrevar Apr 28, 2023
42a019b
Fix performance issue.
Ambrevar May 23, 2023
e789105
Fix missing documentation for attribute-value and attributes-values.
Ambrevar May 23, 2023
255a5f8
.github/workflows/tests: Enable ECL tests.
Ambrevar May 23, 2023
6d92054
Fix ECL support.
Ambrevar May 23, 2023
0a41ab5
tests: Remove spurious extra destroy.
Ambrevar May 25, 2023
520d6f1
Nullify kernels on destroy.
Ambrevar May 25, 2023
c0c757b
tests: Clean up sources after use.
Ambrevar May 25, 2023
333fc53
tests: Destroy prompter even on error.
Ambrevar May 25, 2023
80563ca
tests: Increase timeout for slow ECL.
Ambrevar May 25, 2023
1ca6cdb
tests: Fix error-handling test.
Ambrevar May 25, 2023
97d6be2
tests: Add performance test.
Ambrevar May 26, 2023
ed91c92
Bufferize input.
Ambrevar May 26, 2023
78d3a0d
Remove outdated comment.
Ambrevar May 31, 2023
c62bfb6
Re-allow interrupting prompters (with Lparallel this time).
Ambrevar May 31, 2023
dc5c776
Use define-generic wherever possible.
Ambrevar Jun 1, 2023
be0393d
Simplify initial-suggestions assignment.
Ambrevar Jun 1, 2023
b28d0ce
Use etypecase instead of manual type check.
Ambrevar Jun 1, 2023
67b4cc6
Clarify comment on why we may need a new kernel for attributes.
Ambrevar Jun 1, 2023
4c3346c
Bind processed suggestion properly.
Ambrevar Jun 1, 2023
223132c
Clarify comment on `input-delay'.
Ambrevar Jun 1, 2023
ea2bba2
Fix result-channel type and docstring.
Ambrevar Jun 1, 2023
2eeed30
Use return-from instead of manual block creation.
Ambrevar Jun 1, 2023
adda76e
Add random suffix to kernel name.
Ambrevar Jun 1, 2023
9a6a254
Refactor `if' to `cond' in next-ready-p.
Ambrevar Jun 1, 2023
9ced467
Move source prompter setting from `make' to `initialize-instance :aft…
Ambrevar Jun 1, 2023
ca652f9
Add `kernel' reader for `source'.
Ambrevar Jun 1, 2023
c2e586b
tests: Remove obsolete thread management.
Ambrevar Jun 1, 2023
f99056c
Fix some docstrings and comments.
Ambrevar Jun 2, 2023
f647217
Rename result-channel to `result' and add blocking accessor.
Ambrevar Jun 6, 2023
4021fc0
Fix attributes-non-default docstring.
Ambrevar Jun 8, 2023
3996087
Support extraneous elements in attributes.
Ambrevar Jun 8, 2023
d263b2d
Start computing attribute values immediately.
Ambrevar Jun 8, 2023
ab3866f
Use attribute-value in attribute-default.
Ambrevar Jun 8, 2023
b3a8b86
Add attribute-options and attributes-options.
Ambrevar Jun 8, 2023
b584c45
Fix kill right kernel in source' `destroy'.
Ambrevar Jun 8, 2023
3c84707
Fix-wait for interrupted result future.
Ambrevar Jun 8, 2023
1d89b9f
Export attribute-key and attributes-keys.
Ambrevar Jun 9, 2023
19f2816
Fix ready-p documentation and remove writer.
Ambrevar Jun 26, 2023
cdef02f
Replace update-notifier with update-hook.
Ambrevar Jun 26, 2023
870bd0d
gitmodules: Add nhooks.
Ambrevar Jun 26, 2023
6dbee0d
Add funcall-with-delay.
Ambrevar Jun 28, 2023
0023989
DRAFT: delayed-future.
Ambrevar Jun 30, 2023
1f19271
CLEANUP
Ambrevar Jun 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
# Use ccl-bin/1.12.1 instead of 'ccl' because of
# https://github.com/roswell/roswell/issues/534.
# TODO: Revert when Roswell is functional again.
lisp: [sbcl-bin, ccl-bin/1.12.1]
lisp: [sbcl-bin, ccl-bin/1.12.1, ecl/21.2.1]
rosargs: [dynamic-space-size=3072]
os: [ubuntu-latest, macos-latest] # try windows-latest when we understand commands to install Roswell on it

Expand Down
12 changes: 0 additions & 12 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@
path = _build/symbol-munger
url = https://github.com/AccelerationNet/symbol-munger
shallow = true
[submodule "_build/calispel"]
path = _build/calispel
url = https://github.com/hawkir/calispel
shallow = true
[submodule "_build/cl-jpl-util"]
path = _build/cl-jpl-util
url = https://github.com/hawkir/cl-jpl-util
shallow = true
[submodule "_build/cl-containers"]
path = _build/cl-containers
url = https://github.com/gwkkwg/cl-containers
Expand Down Expand Up @@ -170,10 +162,6 @@
path = _build/trivial-package-local-nicknames
url = https://github.com/phoe/trivial-package-local-nicknames
shallow = true
[submodule "_build/jpl-queues"]
path = _build/jpl-queues
url = https://gitlab.common-lisp.net/nyxt/jpl-queues.git
shallow = true
[submodule "_build/mt19937"]
path = _build/mt19937
url = https://gitlab.common-lisp.net/nyxt/mt19937
Expand Down
5 changes: 5 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,8 @@ Non-exhaustive list of features:
- Marks actions (event-driven on marks change).
- Current suggestion actions (event-driven on current suggestion change).
- Automatically return the prompt when narrowed down to a single suggestion.

* Roadmap

- Benchmark.
See if setting task priorities with Lparallel helps performance.
1 change: 0 additions & 1 deletion _build/calispel
Submodule calispel deleted from e9f2f9
1 change: 0 additions & 1 deletion _build/cl-jpl-util
Submodule cl-jpl-util deleted from 0311ed
1 change: 0 additions & 1 deletion _build/jpl-queues
Submodule jpl-queues deleted from b774d2
19 changes: 12 additions & 7 deletions package.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

(eval-when (:compile-toplevel :load-toplevel :execute)
(trivial-package-local-nicknames:add-package-local-nickname :alex :alexandria)
(trivial-package-local-nicknames:add-package-local-nickname :sera :serapeum))
(trivial-package-local-nicknames:add-package-local-nickname :sera :serapeum)
(trivial-package-local-nicknames:add-package-local-nickname :lpara :lparallel)
(trivial-package-local-nicknames:add-package-local-nickname :lpara.queue :lparallel.queue))

(defmacro define-function (name args &body body)
"Eval ARGS then define function over the resulting lambda list.
Expand All @@ -21,6 +23,13 @@ All ARGS are declared as `ignorable'."
lambda-list-keywords)))
,@body)))

(defun slot-names (class-specifier)
;; TODO: `slot-names' or `direct-slot-names'?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that slot-names makes more sense since it includes slots in superclasses, which is exactly the way you did it :)

#-ecl
(mopu:slot-names class-specifier)
#+ecl
Copy link
Contributor

@aartaka aartaka Jun 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, why? Seems like mopu:slot-names definition is exactly what you're reproducing here:

(defun class-slot-names (thing)
  (let ((class (get-class thing)))
    (if class
      (mapcar 'mop:slot-definition-name
	      (mop:class-slots (finalize-class-if-necessary class)))
      (progn
	(warn "class for ~a not found)" thing)
	nil))))

EDIT: highlightling.

(mapcar #'c2mop:slot-definition-name (c2mop:class-slots (find-class class-specifier))))

(defun initargs (class-specifier)
"Return CLASS-SPECIFIER initargs as symbols (not keywords)."
(delete nil
Expand All @@ -29,11 +38,7 @@ All ARGS are declared as `ignorable'."
(symbol-name
(first (getf (mopu:slot-properties class-specifier slot) :initargs)))
(symbol-package class-specifier)))
;; TODO: `slot-names' or `direct-slot-names'?
#-ecl
(mopu:slot-names class-specifier)
#+ecl
(mapcar #'c2mop:slot-definition-name (c2mop:class-slots (find-class 'prompter))))))
(slot-names class-specifier))))

(defun exported-p (sym)
(eq :external
Expand All @@ -46,4 +51,4 @@ All ARGS are declared as `ignorable'."
(export-always '*debug-on-error*)
(defvar *debug-on-error* nil
"When non-nil, the Lisp debugger is invoked when a condition is raised.
Otherwise all errors occuring in threads are demoted to warnings.")
Otherwise all errors occurring in threads are demoted to warnings.")
Loading
Loading