Implement GitHub authentication

In order to have team features we need a way to authenticate and authorize users. The current idea is to use GitHub as an identity provider and perform authorization based on organization roles.
The GitHub oauth flow is described here. We will be using the web application flow which is a bit more user friendly since it doesn't require the user to manually enter a code. Instead, it requires us to host a small callback application on our side which will be used by GitHub to perform authentication.
An overview of the architecture can be seen here:

The user runs a mantil CLI command which requires authentication. If a token is not already present, this triggers GitHub authentication by opening a browser window. The CLI opens a NATS channel and waits for a response.
After successfully authenticating, GitHub invokes the callback URL of our oauth app. The lambda handler behind this URL uses the oauth app credentials to create a GitHub token.
The callback handler invokes an auth function on the mantil node which knows the public/private key pair used to generate JWT tokens. It then performs authorization by checking organization access rights and allowed projects/users (stored somewhere on the node) and creates the corresponding JWT token.
The auth function then sends the token back to the user's NATS channel.

I implemented a first version of this. It can be enabled by setting the github-org flag when using mantil aws install to create a node, for example:
mantil aws install daniel --aws-profile daniel --github-org mantil-team
Now the node is tied to the mantil-team organization and will require authentication when executing project and node commands.
After successfully authenticating, the node will create a JWT token based on the user's role in the organization and the allowed projects/users for the node:

organization admins will get a token with the Owner role which grants them access to everything including managing the node (adding allowed users/projects and creating long lived tokens for automation)
regular members of the organization will get a token with the Member role if they are on the list of allowed users for the node. This token will grant them permissions to deploy projects allowed on the node.

Admins can manage node users and projects using the mantil user add and mantil project add commands. For example:
mantil user add djelusic --node daniel
and
mantil project add --node daniel --name project --repo=https://www.github.com/mantil-team/project
To test this you will ideally need a github organization with at least two members, one admin and one regular member. For convenience I added a logout command which will erase the stored token and allow you to log in with a different user:
mantil logout daniel
Here daniel is the name of the node.

After some discussion we implemented a few changes to this flow:

the node handles all user authorization now, meaning we don't use GitHub org roles to determine user roles anymore. This also means that nodes will be tied to a GitHub user instead of an organization
mantil project add is gone, a user that has access to the node can deploy any project
node management functions (adding/removing users) are now under a node subcommand
added a mantil node login command which will set up everything needed for a user to access the node

So now an example flow might look like this:
Someone with admin accces to the AWS account creates a node and ties it to their GitHub user.
mantil aws install daniel --aws-profile=daniel --github-user=djelusic

After creating the node they have admin rights to manage it. They can now add users using the user-add command:
mantil node user-add --node daniel --github-user some-user --role user

which will return
Successfully added user some-user. They can now login using the command "mantil node login https://8ilfp3l7yh.execute-api.eu-central-1.amazonaws.com"

Then the user can use this command to log in and start deploying projects to the node. However with the user role they won't have permissions to access node management functions. For that they need the admin role. To upgrade their role you can simply run:
mantil node user-add --node daniel --github-user some-user --role user

After logging in again they will have admin permissions.
Users can also be removed using the user-remove command, for example:
mantil node user-remove some-user --node daniel


Leaderboard Fixes

Fixing issues with the leaderboard since the data has gotten too large to query all at once.
Description

Replace full leaderboard with top 100 and bottom 100 traders
Support searching full addresses and ENS names
Creates a new hook specifically for the leaderboard (useLeaderboard) that handles top/bottom and search
Updates ENS support to look up either way (ens -> address or address -> ens)

Notes

The useGetStats hook is now only used on the homepage. There may be a way to deprecate this hook.

@platschi I'm going to merge, I updated this spacing in another PR for cross margin:


style the figure element?

The use case (at the bottom of this notebook) is a Plot that we want to make 2800px wide, and which should scroll horizontally in Observable.
My suggestion was to create a figure parent by adding a caption, then setting  max-width + scroll overflow styles to the parent, like so:
Object.assign(
Plot.plot({
  width: 2800, height: 700, // sets the viewBox of the .plot svg
  caption: "", // wraps the plot in a figure element
  style: {maxWidth: "2800px"}, // overrides max-width: 100%; of the .plot default css
  … rest of the plot definition
}),
  { style: `max-width: ${width}px; overflow: scroll` } // overrides the figure/max-width style of observable and adds scrolling
)

it looks like there should be a better way at least to set styles on the figure element

I find the default font-size fairly small, but I can adjust it with ...style: { fontSize: 14} .
However, just the text elements of the SVG is rerendered. It would be nice to also style the text of the legend.

"Dark mode" is another use case for this: https://talk.observablehq.com/t/plot-legend-fill-color-when-embedded/7494

I also have the problem where the font-size of the legend doesn't change. See this example:

Which was generated using the following code:
var data = [
    { Date: new Date('1962-01-02'), Value: 0.0406, Name: 'Foo' },
    { Date: new Date('1962-01-03'), Value: 0.0403, Name: 'Bar' },
    { Date: new Date('1962-01-04'), Value: 0.0399, Name: 'Foo' },
    { Date: new Date('1962-01-05'), Value: 0.0402, Name: 'Bar' },
    { Date: new Date('1962-01-06'), Value: 0.0402, Name: 'Foo' },
    { Date: new Date('1962-01-07'), Value: 0.0403, Name: 'Bar' },
    { Date: new Date('1962-01-08'), Value: 0.0403, Name: 'Foo' },
    { Date: new Date('1962-01-09'), Value: 0.0405, Name: 'Bar' },
    { Date: new Date('1962-01-10'), Value: 0.0407, Name: 'Foo' },
    { Date: new Date('1962-01-11'), Value: 0.0408, Name: 'Bar' },
    { Date: new Date('1962-01-12'), Value: 0.0408, Name: 'Foo' },
    { Date: new Date('1962-01-13'), Value: 0.0409, Name: 'Bar' },
    { Date: new Date('1962-01-14'), Value: 0.0409, Name: 'Foo' },
    { Date: new Date('1962-01-15'), Value: 0.041, Name: 'Bar' },
];

var plot = Plot.frame().plot({
    color: {
        legend: true,
    },
    style: {
        fontSize: 20,
    },
    margin: 55,
    grid: true,
    y: {percent: true},
    marks: [
        Plot.lineY(data, {x: "Date", y: "Value", stroke: "Name"}),
    ],
});


Issues building and runnning

While running using command
g++ -std=c++11 main.cpp
I get
main.cpp:64:10: fatal error: mpi.h: No such file or directory
   64 | #include <mpi.h>
      |          ^~~~~~~
compilation terminated.

When typing make i get
CC -std=c++11 -g -O3 -xHost -fopenmp -DDONT_CREATE_DIAG_FILES   -c -o main.o main.cpp
make: CC: Command not found
make: *** [Makefile:47: main.o] Error 127

While doing the make, you can change CC to mpicc in the Makefile and it will work. You can also remove the -xHost command if it isn't available and that will fix it as well. Hope this helps.


transient: error: (error "Invalid face" shadow) when loading radian

I have a weird problem where loading via radian causes transient to throw this really weird error, but loading via my "inner" init file just works fine. As a consequence I cannot use radian atm :cry:
edit:
wait. If I disable magit-todos and dirvish, radian loads fine. emacs --debug-init --eval "(straight-use-package 'dirvish)" also loads fine. What's happening here? Is this a bug in dirvish that only happens from inside radian? But no, magit-todos is also causing the same error. If I disable both the error is gone. So there's definitely a problem here.
I have zero idea at this point what is happening, other than debugging radian myself.
This is after straight-x-fetch-all and straight-merge-all earlier today (on two machines). Radian is on 20c0c9d929a57836754559b470ba4c3c20f4212a
the error
$ emacs --debug-init
Loading /home/hrehfeld/.emacs.d/config/my-before-straight.el (source)...
Loading /home/hrehfeld/.emacs.d/config/my-before-straight.el (source)...done
Building git-gutter...
Building git-gutter...done
Building git-link...
Building git-link...done
Building atomic-chrome...
Building atomic-chrome → Building websocket...
Building atomic-chrome → Building websocket...done
Building atomic-chrome...
Building atomic-chrome...done
Loading /home/hrehfeld/.emacs.d/my-init.el (source)...
Created cite link.
Created citet link.
Created tag link.
Building org-tidy...
Building org-tidy...done
org-super-agenda-mode enabled.
../my-init.el: Warning: Missing format argument
Loading /home/hrehfeld/.emacs.d/var/elgrep-data.el (source)...
Loading /home/hrehfeld/.emacs.d/var/elgrep-data.el (source)...done
Debugger entered--Lisp error: (error "Invalid face" shadow)
  internal-get-lisp-face-attribute(shadow :foreground nil)
  face-attribute(shadow :foreground nil t)
  (let ((color (face-attribute 'shadow :foreground nil t))) (or (and (not (eq color 'unspecified)) color) "grey60"))
  (list ':line-width (if (>= emacs-major-version 28) (cons -1 -1) -1) ':color (let ((color (face-attribute 'shadow :foreground nil t))) (or (and (not (eq color 'unspecified)) color) "grey60")))
  (list t ':box (list ':line-width (if (>= emacs-major-version 28) (cons -1 -1) -1) ':color (let ((color (face-attribute 'shadow :foreground nil t))) (or (and (not (eq color 'unspecified)) color) "grey60"))))
  (list (list t ':box (list ':line-width (if (>= emacs-major-version 28) (cons -1 -1) -1) ':color (let ((color (face-attribute 'shadow :foreground nil t))) (or (and (not (eq color ...)) color) "grey60")))))
  (custom-declare-face 'transient-higher-level (list (list t ':box (list ':line-width (if (>= emacs-major-version 28) (cons -1 -1) -1) ':color (let ((color (face-attribute ... :foreground nil t))) (or (and (not ...) color) "grey60"))))) "Face optionally used to highlight suffixes on high..." :group 'transient-faces)
  require(transient)
  byte-code("\300\301!\210\300\302!\210\303\304\305\306\307\301%\210\310\311\312\313\314DD\315\307\304\316\317&\7\210\310\320\312\313\321DD\322\307\304\316\323&\7\210\310\324\312\313..." [require dired transient custom-declare-group dirvish nil "A better Dired." :group custom-declare-variable dirvish-attributes funcall function #f(compiled-function () #<bytecode 0x1980187dd5054>) "File attributes showing in file lines.\nDirvish shi..." :type (repeat (symbol :tag "Dirvish attribute")) dirvish-preview-dispatchers #f(compiled-function () #<bytecode 0x31574b1067014>) "List of preview dispatchers.\nEach dispatcher in th..." (repeat (symbol :tag "Dirvish preview methods")) dirvish-preview-disabled-exts #f(compiled-function () #<bytecode 0x193b340382b14>) "Do not preview files end with these extensions." (repeat (string :tag "File name extension")) dirvish-preview-environment #f(compiled-function () #<bytecode 0x19800016fe914>) "Variables which are bound for default file preview..." alist dirvish-cache-dir #f(compiled-function () #<bytecode -0x6b44ffc27d96f36>) "Preview / thumbnail cache directory for dirvish." string dirvish-default-layout #f(compiled-function () #<bytecode 0x1ecc2b74dc09f317>) "Default layout recipe for fullscreen Dirvish sessi..." (list (integer :tag "number of parent windows") (float :tag "max width of parent windows") (float :tag "width of preview windows"))] 8)
  (dirvish-override-dired-mode)
  (condition-case err (dirvish-override-dired-mode) ((debug error) (funcall use-package--warning250 :init err)))
  (condition-case err (condition-case err (dirvish-override-dired-mode) ((debug error) (funcall use-package--warning250 :init err))) ((debug error) (funcall use-package--warning250 :catch err)))
  eval-buffer(#<buffer  *load*-835878> nil "/home/hrehfeld/.emacs.d/my-init.el" nil t)  ; Reading at buffer position 82512
  load-with-code-conversion("/home/hrehfeld/.emacs.d/my-init.el" "/home/hrehfeld/.emacs.d/my-init.el" nil nil)
  load("/home/hrehfeld/.emacs.d/my-init.el" nil nil t)
  load-file("~/.emacs.d/my-init.el")
  (progn (my-radian-fixes) (load-file (concat user-emacs-directory "my-init.el")))
  eval((progn (my-radian-fixes) (load-file (concat user-emacs-directory "my-init.el"))) t)
  radian-local--after-init()
...
  load-with-code-conversion("/home/hrehfeld/.emacs.d/radian/emacs/radian.el" "/home/hrehfeld/.emacs.d/radian/emacs/radian.el" nil t)
  load("/home/hrehfeld/.emacs.d/radian/emacs/radian.el" nil nomessage nosuffix)
  (progn (condition-case nil (progn (delete-file (concat radian-lib-file "c"))) (error nil)) (load radian-lib-file nil 'nomessage 'nosuffix))
  (if stale-bytecode (progn (condition-case nil (progn (delete-file (concat radian-lib-file "c"))) (error nil)) (load radian-lib-file nil 'nomessage 'nosuffix)))
  (let* ((radian-original-file-name-handler-alist file-name-handler-alist) (file-name-handler-alist nil) (load-prefer-newer t) (stale-bytecode t)) (catch 'stale-bytecode (if (file-newer-than-file-p radian-local-init-file (concat radian-lib-file "c")) (progn (throw 'stale-bytecode nil))) (load (file-name-sans-extension radian-lib-file) nil 'nomessage) (setq stale-bytecode nil)) (if stale-bytecode (progn (condition-case nil (progn (delete-file (concat radian-lib-file "c"))) (error nil)) (load radian-lib-file nil 'nomessage 'nosuffix))))
  (unwind-protect (let* ((radian-original-file-name-handler-alist file-name-handler-alist) (file-name-handler-alist nil) (load-prefer-newer t) (stale-bytecode t)) (catch 'stale-bytecode (if (file-newer-than-file-p radian-local-init-file (concat radian-lib-file "c")) (progn (throw 'stale-bytecode nil))) (load (file-name-sans-extension radian-lib-file) nil 'nomessage) (setq stale-bytecode nil)) (if stale-bytecode (progn (condition-case nil (progn (delete-file (concat radian-lib-file "c"))) (error nil)) (load radian-lib-file nil 'nomessage 'nosuffix)))) (run-hooks 'radian--finalize-init-hook))
  (let* ((this-file (or user-init-file (expand-file-name "init.el" user-emacs-directory))) (link-target (file-symlink-p this-file))) (if link-target nil (error "Init-file %S is not a symlink" this-file)) (defvar radian-lib-file (expand-file-name "radian.el" (file-name-directory link-target)) "File containing main Radian configuration.\nThis fi...") (if (file-exists-p radian-lib-file) nil (error "Library file %S does not exist" radian-lib-file)) (defvar radian--finalize-init-hook nil "Hook run unconditionally after init, even if it fa...") (defvar radian-original-file-name-handler-alist nil "The value of `file-name-handler-alist' during load...") (unwind-protect (let* ((radian-original-file-name-handler-alist file-name-handler-alist) (file-name-handler-alist nil) (load-prefer-newer t) (stale-bytecode t)) (catch 'stale-bytecode (if (file-newer-than-file-p radian-local-init-file (concat radian-lib-file "c")) (progn (throw 'stale-bytecode nil))) (load (file-name-sans-extension radian-lib-file) nil 'nomessage) (setq stale-bytecode nil)) (if stale-bytecode (progn (condition-case nil (progn (delete-file ...)) (error nil)) (load radian-lib-file nil 'nomessage 'nosuffix)))) (run-hooks 'radian--finalize-init-hook)))
  (if (version< emacs-version radian-minimum-emacs-version) (error (concat "Radian Emacs requires at least Emacs %s, " "but you are running Emacs %s") radian-minimum-emacs-version emacs-version) (let* ((this-file (or user-init-file (expand-file-name "init.el" user-emacs-directory))) (link-target (file-symlink-p this-file))) (if link-target nil (error "Init-file %S is not a symlink" this-file)) (defvar radian-lib-file (expand-file-name "radian.el" (file-name-directory link-target)) "File containing main Radian configuration.\nThis fi...") (if (file-exists-p radian-lib-file) nil (error "Library file %S does not exist" radian-lib-file)) (defvar radian--finalize-init-hook nil "Hook run unconditionally after init, even if it fa...") (defvar radian-original-file-name-handler-alist nil "The value of `file-name-handler-alist' during load...") (unwind-protect (let* ((radian-original-file-name-handler-alist file-name-handler-alist) (file-name-handler-alist nil) (load-prefer-newer t) (stale-bytecode t)) (catch 'stale-bytecode (if (file-newer-than-file-p radian-local-init-file (concat radian-lib-file "c")) (progn (throw ... nil))) (load (file-name-sans-extension radian-lib-file) nil 'nomessage) (setq stale-bytecode nil)) (if stale-bytecode (progn (condition-case nil (progn ...) (error nil)) (load radian-lib-file nil 'nomessage 'nosuffix)))) (run-hooks 'radian--finalize-init-hook))))
  (cond ((and (not after-init-time) radian--init-file-loaded-p)) (alternate-user-emacs-directory (setq alternate-user-emacs-directory (file-name-as-directory alternate-user-emacs-directory)) (setq user-emacs-directory alternate-user-emacs-directory) (setq user-init-file (expand-file-name "init.el" user-emacs-directory)) (load user-init-file 'noerror 'nomessage)) (t (setq radian--init-file-loaded-p t) (defvar radian-minimum-emacs-version "27.1" "Radian Emacs does not support any Emacs version be...") (defvar radian-local-init-file (expand-file-name "init.local.el" user-emacs-directory) "File for local customizations of Radian.") (setq package-enable-at-startup nil) (setq custom-file (expand-file-name "custom.el" user-emacs-directory)) (load custom-file 'noerror 'nomessage) (if (version< emacs-version radian-minimum-emacs-version) (error (concat "Radian Emacs requires at least Emacs %s, " "but you are running Emacs %s") radian-minimum-emacs-version emacs-version) (let* ((this-file (or user-init-file (expand-file-name "init.el" user-emacs-directory))) (link-target (file-symlink-p this-file))) (if link-target nil (error "Init-file %S is not a symlink" this-file)) (defvar radian-lib-file (expand-file-name "radian.el" (file-name-directory link-target)) "File containing main Radian configuration.\nThis fi...") (if (file-exists-p radian-lib-file) nil (error "Library file %S does not exist" radian-lib-file)) (defvar radian--finalize-init-hook nil "Hook run unconditionally after init, even if it fa...") (defvar radian-original-file-name-handler-alist nil "The value of `file-name-handler-alist' during load...") (unwind-protect (let* ((radian-original-file-name-handler-alist file-name-handler-alist) (file-name-handler-alist nil) (load-prefer-newer t) (stale-bytecode t)) (catch 'stale-bytecode (if ... ...) (load ... nil ...) (setq stale-bytecode nil)) (if stale-bytecode (progn ... ...))) (run-hooks 'radian--finalize-init-hook))))))
  (let ((alternate-user-emacs-directory (getenv "USER_EMACS_DIRECTORY"))) (defvar radian--init-file-loaded-p nil "Non-nil if the init-file has already been loaded.\n...") (cond ((and (not after-init-time) radian--init-file-loaded-p)) (alternate-user-emacs-directory (setq alternate-user-emacs-directory (file-name-as-directory alternate-user-emacs-directory)) (setq user-emacs-directory alternate-user-emacs-directory) (setq user-init-file (expand-file-name "init.el" user-emacs-directory)) (load user-init-file 'noerror 'nomessage)) (t (setq radian--init-file-loaded-p t) (defvar radian-minimum-emacs-version "27.1" "Radian Emacs does not support any Emacs version be...") (defvar radian-local-init-file (expand-file-name "init.local.el" user-emacs-directory) "File for local customizations of Radian.") (setq package-enable-at-startup nil) (setq custom-file (expand-file-name "custom.el" user-emacs-directory)) (load custom-file 'noerror 'nomessage) (if (version< emacs-version radian-minimum-emacs-version) (error (concat "Radian Emacs requires at least Emacs %s, " "but you are running Emacs %s") radian-minimum-emacs-version emacs-version) (let* ((this-file (or user-init-file ...)) (link-target (file-symlink-p this-file))) (if link-target nil (error "Init-file %S is not a symlink" this-file)) (defvar radian-lib-file (expand-file-name "radian.el" (file-name-directory link-target)) "File containing main Radian configuration.\nThis fi...") (if (file-exists-p radian-lib-file) nil (error "Library file %S does not exist" radian-lib-file)) (defvar radian--finalize-init-hook nil "Hook run unconditionally after init, even if it fa...") (defvar radian-original-file-name-handler-alist nil "The value of `file-name-handler-alist' during load...") (unwind-protect (let* (... ... ... ...) (catch ... ... ... ...) (if stale-bytecode ...)) (run-hooks 'radian--finalize-init-hook)))))))
  eval-buffer(#<buffer  *load*-933820> nil "/home/hrehfeld/.emacs.d/init.el" nil t)  ; Reading at buffer position 5490
  load-with-code-conversion("/home/hrehfeld/.emacs.d/init.el" "/home/hrehfeld/.emacs.d/init.el" nil t)
  load("/home/hrehfeld/.emacs.d/init.el" nil nomessage nosuffix)
  (if (getenv "USER_EMACS_DIRECTORY") nil (defalias 'radian--advice-fix-display-graphic-p #'(lambda (func &optional display) "Fix `display-graphic-p' so it works while loading ..." (if display (funcall func display) initial-window-system))) (advice-add #'display-graphic-p :around #'radian--advice-fix-display-graphic-p) (defalias 'radian--advice-fix-xw-display-color-p #'(lambda (func &optional display) "Fix `xw-display-color-p' so it works while loading..." (if (or display after-init-time) (funcall func display) initial-window-system))) (advice-add #'xw-display-color-p :around #'radian--advice-fix-xw-display-color-p) (defalias 'radian--advice-disable-x-resource-application #'(lambda nil "Disable `x-apply-session-resources'.\nNow, `x-apply...")) (advice-add #'x-apply-session-resources :override #'radian--advice-disable-x-resource-application) (load (expand-file-name "init.el" user-emacs-directory) nil 'nomessage 'nosuffix) (advice-remove #'display-graphic-p #'radian--advice-fix-display-graphic-p) (advice-remove #'xw-display-color-p #'radian--advice-fix-xw-display-color-p))
  eval-buffer(#<buffer  *load*> nil "/home/hrehfeld/.emacs.d/early-init.el" nil t)  ; Reading at buffer position 2406
  load-with-code-conversion("/home/hrehfeld/.emacs.d/early-init.el" "/home/hrehfeld/.emacs.d/early-init.el" t t)
  load("/home/hrehfeld/.emacs.d/early-init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode -0x1873941f39170d90>))
  command-line()
  normal-top-level()

Saving file /home/hrehfeld/.emacs.d/var/elgrep-data.el...
Wrote /home/hrehfeld/.emacs.d/var/elgrep-data.el
Saving session
Saving session...DONE

the files
My init.local.el looks like this: (you can probably ignore all of my-radian-fixes. It sets straight variables and then loads my-init.el in after-init
(when (display-graphic-p)
  (tool-bar-mode -1))
(setq radian-org-enable-contrib t)
(setq radian-color-theme-enable nil)
(setq radian-font nil)
(setq radian-font-size nil)

(setq radian-disabled-packages
      '(zerodark-theme
        lsp-python-ms
        smartparens
        undo-tree
        ))

(defun my-radian-fixes ()
  ;; try fixing weird errors
  (setq load-path (delete "/usr/share/emacs/28.0.91/lisp/org" load-path))

  (unless (fboundp #'org-file-name-concat)
    (defalias #'org-file-name-concat #'file-name-concat))
  (auto-fill-mode -1)
  (turn-off-auto-fill)
  ;; this should ACTUALLY do the trick
  (setq-default auto-fill-function nil)

  (setq make-backup-files t)

  ;; don't delete selected text when inserting chars
  (delete-selection-mode -1)
  ;; fix radian overwriting dabbrev-expand which we ALWAYS ALWAYS want
  ;; undo-tree-redo is avalaible with C-S-/ instead, which is easy
  (with-eval-after-load 'undo-tree-map
    (bind-key--remove (kbd "M-/") undo-tree-map))

  ;; radian rebinds mwheel to custom functions, so mouse-wheel-follow-mouse doesn't work anymore
  (global-set-key (kbd "<mouse-4>") #'mwheel-scroll)
  (global-set-key (kbd "<mouse-5>") #'mwheel-scroll)

  ;; zerodark installs a box, which clashes with buffer-modeline-color
  (set-face-attribute 'mode-line nil :box nil)
  (set-face-attribute 'mode-line-inactive nil :box nil)

  ;;company
  (use-package company
    :bind (:filter company-mode
                   ("<tab>" . #'company-complete))
    :bind (:map company-active-map
                ([remap company-complete-selection] . #'company-complete-common-or-cycle))
    :init (company-prescient-mode -1)
    :config (setq company-dabbrev-other-buffers 'all)
    )

  (use-feature apheleia
    :config (add-to-list 'apheleia-formatters
                         '(clang-format "clang-format" file))
    (add-to-list 'apheleia-mode-alist '(c++-mode . clang-format))
    (add-to-list 'apheleia-mode-alist '(c-mode . clang-format))
    :init
    ;; this not a good idea if you work on existing code
    (apheleia-global-mode -1)

    (defun my-apheleia-enable-via-dir-local-variable (directory)
      (interactive "Enable apheleia-mode auto-formatting for the current major-mode in the following directory:")
      (add-dir-local-variable major-mode 'eval '(apheleia-mode))
      (message "Permanently enabled apheila-mode for `%s' in %s" major-mode directory)
      )
    )

  ;; (smartparens-global-mode -1)
  ;; (add-hook 'lisp-mode-hook #'smartparens-mode)
  ;; (add-hook 'emacs-lisp-mode-hook #'smartparens-mode)

  ;; fix paredit obsessive bindings
  ;; (define-key smartparens-mode-map (kbd "M-s") nil)
  ;; (define-key smartparens-mode-map (kbd "M-r") nil)
  ;; (define-key smartparens-mode-map (kbd "M-j") nil)

  ;; (define-key smartparens-mode-map (kbd "C-M-j") 'sp-join-sexp)

  ;; https://github.com/raxod502/radian/issues/490
  (setq help-enable-symbol-autoload t)

  )

(radian-local-on-hook before-straight
  (load-file (concat user-emacs-directory "config/my-before-straight.el")))

(radian-local-on-hook after-init
  (my-radian-fixes)

  ;;prefer over adding .emacs.d to load-path
  (load-file (concat user-emacs-directory "my-init.el"))
  )

my-before-straight.el is trivially setting variables
(setq straight-host-usernames
      (let ((hrehfeld "hrehfeld"))
        `((github . ,hrehfeld)
          (gitlab . ,hrehfeld)
          (bitbucket . ,hrehfeld)))
      ;; straight-repository-branch "master"
      )
(setq straight-recipe-overrides
      '(nil .
            ((dash :fork t :protocol ssh)
             ;; we need a recent magit version for `compat' compatability
             (magit :branch "main")
             (forge :branch "main")
             )))
(provide 'my-before-straight)

my-init.el is my main config that pulls in all the packages. The only relevant part should be how I setup straight and use-package at the bottom (before the cut):
;; -*- lexical-binding: t; -*-
;; Added by Package.el.  This must come before configurations of
;; installed packages.  Don't delete this line.  If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
;(package-initialize)

;;(require 'my-early)

;; straight requires reloading everything on init
(defvar my-features-pre-init nil "list of features before we started requiring things.")

;; so we just hack features so every require reloads
(if my-features-pre-init
    ;; either reset features
    (setq features my-features-pre-init)
  ;; or save the initial features
  (setq my-features-pre-init features))

;; add config paths to load path
(defvar my-init-directories
	(mapcar
   (lambda (dir) (concat user-emacs-directory dir))
	 '("package-config" "config" "private-config"))
	"List of directories where my init files reside.")

(mapc (lambda (d) (add-to-list 'load-path d)) my-init-directories)

(defvar my/package-dirs (list (concat user-emacs-directory "my-packages")) "List of directories to scan for sub-packages.")

;; initialize straight and use-package if radian didn't already do it for us
(unless (featurep 'straight)
  (require 'my-straight))
(unless (featurep 'my-use-package)
  (require 'my-use-package))

...

my-straight.el just bootstraps straight after requiring my-before-straight.el:
(require 'my-before-straight)

(setq package-enable-at-startup nil)

(defvar bootstrap-version)
(let ((bootstrap-file
       (expand-file-name
        "straight/repos/straight.el/bootstrap.el"
        (or (bound-and-true-p straight-base-dir)
            user-emacs-directory)))
      (bootstrap-version 7))
  (unless (file-exists-p bootstrap-file)
    (with-current-buffer
        (url-retrieve-synchronously
         "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
         'silent 'inhibit-cookies)
      (goto-char (point-max))
      (eval-print-last-sexp)))
  (load bootstrap-file nil 'nomessage))
)

(provide 'my-straight)

my-use-package.el sets up wrappers for use-package so that I have a form that works like use-package with package.el. probably not too interesting, but might be relevant, because all later requires/use-packages use the my-use-package foo :ensure t) form
;; use-package compatability

(straight-use-package 'use-package)

(unless (fboundp #'use-feature)
  (defmacro use-feature (name &rest args)
    "Like `use-package', but with `straight-use-package-by-default' disabled.
NAME and ARGS are as in `use-package'."
    (declare (indent defun))
    `(use-package ,name
       ,@(unless (member :straight args)
           '(:straight nil))
       ,@args)))

(require 'map)
(defmacro my-use-package (name &rest args)
  "Like `use-package', but with `straight-use-package-by-default' enabled
NAME and ARGS are as in `use-package'."

  (declare (indent defun))
  (cl-assert (not (member :ensure args)) args)
  `(my-use-package ,name
     ,@(unless (member :demand args)
         '(:demand t))
     ,@args
     ))

(defun my-use-package-demand-random-time ()
  (1+ (random 15)))

(provide 'my-use-package)

manual loading
Now, if I do this:
emacs -Q --eval '(load-file (concat user-emacs-directory "my-init.el"))'

I get a few warnings, but otherwise everything loads fine:
*Messages*
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading /home/hrehfeld/.emacs.d/my-init.el (source)...
Created cite link.
Created citet link.
Created tag link.
Importing package-keyring.gpg...done
Contacting host: elpa.gnu.org:443
Package refresh done
Contacting host: elpa.nongnu.org:443
Package refresh done
org-super-agenda-mode enabled.
‘nov’ package not found
ATTENTION: org-noter-nov needs the package ‘nov’
‘djvu’ package not found
ATTENTION: org-noter-djvu needs the package ‘djvu’
../my-init.el: Warning: Missing format argument
Local variables list is not properly terminated
Loading /home/hrehfeld/.emacs.d/org-recent-headings...done
org-recent-headings-mode enabled.
Loading /home/hrehfeld/.emacs.d/elgrep-data.el (source)...done
Building magit...
Building magit → Building git-commit...done
Building magit → Building magit-section...done
Building magit...done
../my-init.el: Warning: Unknown type: window-configuration
Function provided is already compiled [8 times]
Importing package-keyring.gpg...done
Contacting host: elpa.gnu.org:443 [2 times]
Package refresh done
Contacting host: elpa.nongnu.org:443
Package refresh done
../straight/build/slime/slime.el: Warning: Obsolete calling convention for 'sit-for'
Warning: setting attribute ‘:foreground’ of face ‘rainbow-blocks-depth-1-face’: nil value is invalid, use ‘unspecified’ instead. [2 times]
Warning: setting attribute ‘:foreground’ of face ‘rainbow-blocks-depth-2-face’: nil value is invalid, use ‘unspecified’ instead. [2 times]
Warning: setting attribute ‘:foreground’ of face ‘rainbow-blocks-depth-3-face’: nil value is invalid, use ‘unspecified’ instead. [2 times]
Warning: setting attribute ‘:foreground’ of face ‘rainbow-blocks-depth-4-face’: nil value is invalid, use ‘unspecified’ instead. [2 times]
Warning: setting attribute ‘:foreground’ of face ‘rainbow-blocks-depth-5-face’: nil value is invalid, use ‘unspecified’ instead. [2 times]
Warning: setting attribute ‘:foreground’ of face ‘rainbow-blocks-depth-6-face’: nil value is invalid, use ‘unspecified’ instead. [2 times]
Warning: setting attribute ‘:foreground’ of face ‘rainbow-blocks-depth-7-face’: nil value is invalid, use ‘unspecified’ instead. [2 times]
Warning: setting attribute ‘:foreground’ of face ‘rainbow-blocks-depth-8-face’: nil value is invalid, use ‘unspecified’ instead. [2 times]
Importing package-keyring.gpg...done
Contacting host: elpa.gnu.org:443
Package refresh done
Contacting host: elpa.nongnu.org:443
Package refresh done
ad-handle-definition: ‘align-regexp’ got redefined
Package cl is deprecated
Beginning of buffer [3 times]
Vterm needs `vterm-module' to work.  Compile it now? (y or n) n
../straight/build/pointless/pointless.el: Warning: Unknown type: number-or-marker [3 times]
../straight/build/pointless/pointless.el: Warning: Unknown type: pointless--tree-position [2 times]
../straight/build/pointless/pointless.el: Warning: Missing format argument [2 times]
Warning: setting attribute ‘:background’ of face ‘highlight-indent-guides-character-face’: nil value is invalid, use ‘unspecified’ instead. [2 times]
Loading /home/hrehfeld/.emacs.d/my-init.el (source)...done

This is after straight-x-fetch-all and straight-merge-all earlier today

Wouldn't that update all packages to the latest version? Don't you want straight-thaw-versions to use the versions that in Radian's lockfile? More recent versions might work, but I haven't tested them yet.


Variable names are not recorded in for blocks

If the for block has an increment statement, the state of the variables inside the block are recorded, but not their name.
For example in the following case the name of the variable j is not recorded:
  47|      @Test
  48|      public void for_test() throws Exception {
  49|          for (int i = 0; i < 10; i++) {  // i=0
  50|              int j = i * 2;  // 0
  51|*             fail();  // AssertionError
  52|          }
  53|      }

But with an empty increment statementthe recording works fine:
  47|      @Test
  48|      public void for_test() throws Exception {
  49|          for (int i = 0; i < 10;) {  // i=0
  50|              int j = i * 2;  // j=0
  51|*             fail();  // AssertionError
  52|          }
  53|      }

Turns out, sometimes the end label of a variable is for an earlier line number than the start label.
Fixed scope calculation to handle this case.


Lack of description for the dotnet.exe

not sure where to post this so posting in multiple locations.
Can we have a description for the dotnet.exe (for Windows)?
Currently it just shows up in Task Manger when running with no description and just displaying the exe name "dotnet"
A more meaningful description would be useful mentioning that this is the Core version and probably the version number in there.
".NET Core runtime" or something.

Closing as this is already filed in the right place: https://github.com/dotnet/core-setup/issues/2817


Use mapping for lookahead in PreconfTaskManager.sol

This makes state var lookahead use 1 slot regardless its actual size.

To prevent conflicts, I have considered the changes in #171


Added preliminary HuC-3 documentation.

This adds preliminary documentation for the HuC-3 combination memory controller, real-time clock, tone generator and infrared communication controller.  Most of the information is already collected in the cited Gameboy Development Forum thread as well as various emulator sources.
I also edited the HuC1 page a little after looking at the contributing guidelines:

Use $ as prefix for hexadecimal numbers
Use no prefix for hexadecimal addresses
Use en dash rather than hyphen to denote ranges
Hyphenate “read-only” and “write-only”

The MBC5 page change just wraps a line that stood out as excessively long at 72 columns like the rest of the file seems to use.

Considering this is called "preliminary", are you planning to expand this doc further?

Depends on how motivated I am to try and reverse-engineer the behaviour of a microcontroller embedded in a chip with very little to go on.  The fact is, knowledge about the HuC-3 is very limited at the moment.

That's perfectly fine, I was asking only to know whether to mark this PR as a draft :)

OK:

Changed headings to use em dash separator between address and description, square brackets around read/write usage information, and lowercase for read/write usage information.
Removed double blank lines.
Fixed the stray “t”.
Added radix prefix to addresses in prose.
Backed out MBC5.md change.
Replaced backslash-escaped foot/inch marks with typographical quotes/apostrophes.

I still don’t know exactly what this is actually going to look like in the end, as every flavour of markdown is handled differently.  I’m mostly familiar with Sphinx RST (as used in MAME’s documentation), and the GitHub and Reddit flavours.

Are you unable to set up mdBook locally? I can upload a render myself if that's the case.

It’s a matter of being thin on the ground.  I have a constant backlog of MAME work, as well as real life™, and I’m severely sleep deprived.  I simply don’t have the energy to set up mdBook locally.
The GitHub workflows seemed to want to upload to your main site, so I didn’t try enabling them on my fork, because I don’t want to hit you with security alerts when it fails to push out the updated.

The GitHub workflow has a safeguard so that it only updates the website when ran as a push, to master, on gbdev/pandocs. Don't worry, we already had a few issues with my fork way back when. :P
Anyway, I manually rendered the current state here.

I still don’t know exactly what this is actually going to look like in the end, as every flavour of markdown is handled differently. I’m mostly familiar with Sphinx RST (as used in MAME’s documentation), and the GitHub and Reddit flavours.

Note that GH-flavored MarkDown is a couple of extensions over CommonMark, which mdBook's parser implements, plus a few GitHub extensions.
I'll review tomorrow, I must ensure I don't become sleep-deprived myself ^^'


Extend the prototype of Model at definition time

Instead of extending the model instance each time, we should extend the Model class definition a single time. This has some benefits:

Allows us to test model method definitions without instantiating it (for example MyModel.prototype.calculateSomething.call(stub))
It prevents a developer from having model instances with different behaviours (which would happen if the extend object would be modified from outside)
It's a micro performance improvement.

Coverage remained the same at 97.507% when pulling 8423bb40428f6e629fa3b0f04ce6ab8758f5ab39 on extend-model-class into 60d9d4d909d946754283fa5d161c300921d390ad on master.

@reaktivo: Thanks Marcel! 💖
One more approval, and I will merge it.


Module unloading and Store object removal or garbage collection

Feature

The ability to unload a module, which practically removes objects from Store.
The specification notes:

In practice, implementations may apply techniques like garbage collection to remove objects from the store that are no longer referenced. However, such techniques are not semantically observable, and hence outside the scope of this specification.

From this I infer that the implementing or not implementing such a feature and the details of the implementation are left for the runtime. I imagine that future proposals can affect the implementation this feature. The feature seems to be required in the long term.
Related topics and links:

https://bytecodealliance.zulipchat.com/#narrow/stream/206238-general/topic/Unloading.20a.20module
https://www.w3.org/TR/wasm-core-1/#store①
https://github.com/bytecodealliance/wasmtime/issues/960
https://github.com/WebAssembly/module-linking/blob/master/proposals/module-linking/Explainer.md#additional-requirements

Benefit

Currently Wasm modules can be linked together, but there is no way to unload modules completely. As a result, programs that would require loading modules for temporary use or to conserve memory will "leak memory" as time goes on and eventually the program will run into issues with memory limitations. Removal of objects that are no longer referenced from anywhere would free the memory of those unused objects. The main goal is to be able to unload an entire module once the module's structures are no longer referenced or the references are removed through the host by the embedder or runtime - the removal of individual parts of a module is not necessary.
Implementation

One approach is to use reference counting of all objects in a store. With the counting, objects that are no longer referenced can be freed.
If a module uses dynamic steps, such as memory allocation, during the instantiation of the module (for example when calling the start function right after instantiation step), then the a function that deallocates that memory should be called before unloading the module. This requires the ability to trigger a function when a module is unloaded. The function can be called automatically by the runtime or it can be called by the embedder just before unloading the module through the new functionality. The deallocation function seems like it should potentially be a part of Wasm specification if it is not already.
Alternatives

Another approach is to use garbage collection algorithms, such as a mark and sweep algorithm.
Cycles of references can exist through the Wasm Table, which means that cycles would need to be detected and all of the objects in the cycle freed if the cycle is not referenced from elsewhere.
The removal of objects could be done automatically immediately when possible or it could be invoked by the runtime itself periodically or when needed. The collection could be configured by or left to the embedder to invoke.
It seems that WAVM has implemented a GC function that can be called by the embedder. On the surface it looks like a mark and sweep approach, but I am unsure. https://github.com/WAVM/WAVM/blob/530f33cd30c6ea5114a227175b3a7b0af77cadaa/Lib/Runtime/ObjectGC.cpp#L252
The function to allows garbage collection of unused modules and objects, but it looks like it could only be invoked when the host has control.  On the other hand it allows the embedder to have some control on when the collection should occur.
An alternative to automatic GC and memory management schemes is to provide the embedder the ability to directly attempt to unload a given module or all parts of a module individually. The module's memories, tables and other structures would then be freed. This would require the embedder to ensure that no references to the module or its parts exist or the references should be handled by the runtime either by removing them or by handling them gracefully when used.
The benefits of this approach is that the implementation of if may be simpler and more effective. However, the potential references that modules may have are of concern. Either the embedder is trusted or a mechanism to find and potentially remove existing references or raise an error when one is found should be implemented.

I have now updated the issue with more information on the requirements and intent.
I also added more information on the required implementation and more alternatives.

Thank you for the detailed description of the feature and its implications, @Rochet2. It does seem to me that the handling of references is really the sticky bit here. There might not be too much upside to making module unloading work in the absence of references, and the semantics of references to require them to stay valid.
I know that there's been some work on cross-store references, and perhaps the answer here might be to extend linking in a way that allows for hierarchies with multiple stores instead of trying to unload modules from a single store?
I have to confess that my understanding of all this is somewhat superficial, but I know that @lukewagner, @fitzgen, @alexcrichton, and others have thought about this more extensively.

Indeed thanks for  the report! Technically there is a way to unload a module right now which is to deallocate a Store and all objects that refer to it, but that's not a great solution in the long-term and I agree that we should be instead ideally be enabling some form of a persistent Store.
Otherwise though unfortunately reference counting won't work due to the cycle problem you pointed out with functions being able to cross instances and create cycles through tables. Fixing that I think would require some form of GC (probably mark/sweep for us). We do already have a Store::gc method,  however, for reference types that we could piggy-back onto if we ever add this.
What @tschneidereit may also work depending on the use case. We haven't implemented cross-store references today but the thinking is that you could link modules between two stores in a way that they can be easily disconnected. For example if one Store goes away then calling its functions from another Store would simply trap (or something like that)

We've talked about stacking nested stores on top of each other to allow for pushing and popping sets of instances rather than the current all-or-nothing model. We could maybe do the same with Engines and Modules (although now there are two stacks that have relationships with each other, which is losing a bit of the stack-y elegance)? This doesn't give full expressibility of adding and removing modules/instances in any order though.
Semi-aside: We've always wanted to support use cases where a full GC isn't desired. At the same time, certain Wasm proposals will require a full tracing GC. When we support those proposals, we might as well also have the GC manage things like modules and instances and stores, etc... to allow for the kind of flexibility requested in this issue. However, it isn't clear to me what we will do when that Wasm feature is not enabled and in situations where a full tracing GC isn't desired. Are we going to forever maintain two versions of the embedder API that you can choose between with cargo features? One tracing GC'd and one ref counted? Or just forever disallow the flexibility requested in OP and only use ref counting?

To help with reasoning about how an unloading system would be implemented I created this graph where two modules share different resources, including table, memory, global. There is also a call stack that refers to the functions of modules.
The modules own only functions and only refer to other resources. The arrow from A to B signifies a reference held by A to B. The red-colored arrows signify references held by a table. The store and the references from a store to basically all elements are omitted.

If a GC is not desired, then reference counting could be implemented. The issue of cyclic references could be relatively simply solved by using weak references in tables. If all of the red arrows in the graph are weak references, then there are no strong references that could create a cycle, apart from the ones created between the host. However, the cycles with the host will be resolved by the embedded freeing them when the modules or other resources are no longer needed. In such an implementation all references held by a Store would probably be weak references also. As a result, the store would no longer be a key element in keeping the created elements alive.
If an element is freed and it is pointed to by a weak reference, then the weak reference could be unset at that time or when it is attempted to be used. However, testing if a reference is valid on every use could cause unnecessary (negligible?) overhead. I am unsure of how the execution is implemented, but I assume that the call stack would have a reference at least to the function in the stack. Any references to memories or tables would be possible also without creating any cycles as long as the call stack cannot refer to itself.

I know that there's been some work on cross-store references, and perhaps the answer here might be to extend linking in a way that allows for hierarchies with multiple stores instead of trying to unload modules from a single store?

thinking is that you could link modules between two stores in a way that they can be easily disconnected. For example, if one Store goes away then calling its functions from another Store would simply trap (or something like that)

Hmm, I have not personally considered or seen discussions yet on multiple stores. Probably need to take a look at that. The first thought is that it could potentially pave the way to nano processes sharing data efficiently.
However, to me, it would seem to create complexity and I am unsure what the benefit of that would be exactly without knowing more. If two stores can share a reference to basically any element of another store, then it would be the same as having a single store in my mind as references between all elements must still be handled one way or another.
Per the above suggestions, any invalid references could trap or be set to a null reference instead of pointing to invalid unloaded parts of the system. Unsure if there are some lifetime restrictions that references in a table should impose on the Wasm structures according to the specification. I could not directly find any.

stacking nested stores on top of each other to allow for pushing and popping sets of instances
This doesn't give full expressibility of adding and removing modules/instances in any order though.

From the perspective of a system that would require an unloading mechanism as a part of its operation regularly, it would probably be quite hindering if in order to gain memory to load a new module it would need to free an entire stack of modules. Such a runtime design would probably affect the design of the modules themselves I would imagine.

Semi-aside:
We've always wanted to support use cases where a full GC isn't desired
certain Wasm proposals will require a full tracing GC

If a GC is required by Wasm, then it should probably be implemented. If a GC is not desired in a use case it could be disabled/not used/never invoked. Proposals that might require a GC would probably need to be thought thoroughly through in case they don't really require one - such as this particular issue on unloading modules.
However, if a GC is not desired even as a part of the implementation when not desired in a use case then that probably imposes large changes to the runtime. Would probably need some examples of such use cases to think it through.


Replace old switch case with enhanced switch

Signed-off-by: Bazlur Rahman<EMAIL_ADDRESS>

Hey @rokon12, builds failed. Mind to check?
Please keep in mind that the source code must be Java 11 at a minimum, in case you are using some feature of Java 17.

I will have a look again, but I thought we were bumping to 17

We are exploring how we may welcome Java 17 features while having 11 as minimum, by using Multi-release JARs.

We are exploring how we may welcome Java 17 features while having 11 as minimum, by using Multi-release JARs.

In that case, this PR maybe be closed, since this PR is about mainly java 17 features.


v4l2decode: fix some build issue when there is no x11

include VideoCommonDefs.h without prefix since the folder name
is different in original source and installed dir

define V4L2_EVENT_RESOLUTION_CHANGE if there is not it yet, in v4l2_wrapper.h

+1

merged as 1dddbab5bd05a09f01f7e833d8937ffa270e2fd1

thanks halley.


Unexpected results with multiple users

Hi @rodneyviana,
Thanks for sharing this! Works perfectly locally, but I'm having some weird issues with a remote desktop server (2022). There are roughly 10 users. When I run ODSyncUtil on my account, I get the results of 5 users (none of them myself), all with empty results. When another user runs ODSyncUtil, he gets the result of 4 users (including me, but not himself). When I run under the admin account, I get the results of 6 users - again not with the actual admin user itself.
Is there any logic behind this, and is there I way I can get ODSyncUtil to only fetch the current user?
All empty results are as follows (the x's are mine):
{
  "CurrentState": 0,
  "CurrentStateString": "",
  "FolderPath": "C:\\Users\\User\\..",
  "IconColorA": 0,
  "IconColorB": 0,
  "IconColorG": 0,
  "IconColorR": 0,
  "IconUri": "",
  "isQuotaAvailable": false,
  "Label": "",
  "QuotaLabel": "",
  "ServiceName": "Business1",
  "Sid": "S-1-5-21-xxxxxxxxxx-xxxxxxxxx-xxxxxxxxx-1001",
  "SyncRootId": "OneDrive!S-1-5-21-xxxxxxxxxx-xxxxxxxxx-xxxxxxxxx-1001!Business1|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+1",
  "TotalQuota": 0,
  "UsedQuota": 0,
  "UserName": ".\\User"
}

Hi @SamKr,
Make sure you have the latest version because the current code, as you can see, only returns matching SIDs
    auto userSid = getCurrentUserSid();
    Debug.Write(L"Current User SID: %s\n", userSid.c_str());
    if (sid != userSid) {
		return ERROR_INVALID_SID;
    }

I'm using the latest release: <IP_ADDRESS>00.

can you enable logging and see what it says?

I confirm this problem that was mentioned. The strangest thing is that if I use this program everything works as expected - it returns me and as well other users. However, when I use it on a user who is a "production" for me - restricted, windows default (no special rights) it shows other users but not him. Note - I have not done enough testing to confirm exactly what depends on the correctness of the data.
Debug shows:
2024-06-18 20:16:28.907: Command line arguments parsed
2024-06-18 20:16:28.907: Save file name: ?????
2024-06-18 20:16:28.908: Is debug: 1
2024-06-18 20:16:28.910: Ignore quota: 0
2024-06-18 20:16:28.915: CoInitialize succeeded
2024-06-18 20:16:28.916: SyncRootReader created
2024-06-18 20:16:28.916: EnumerateSubKeys returned 2 keys
2024-06-18 20:16:28.919: Getting status for OneDrive!S-1-5-21-4092918392-9999999999-100100100-20020!Business1|f7025fa31b834fb2a1e11111a1e1a11f
2024-06-18 20:16:28.920: SID: S-1-5-21-4092918392-9999999999-100100100-20020
2024-06-18 20:16:28.920: User: CONSONTO\aaa010
2024-06-18 20:16:28.920: Type: Business1
2024-06-18 20:16:28.921: Current User SID: S-1-5-21-4092918392-9999999999-100100100-20020
2024-06-18 20:16:28.926: CoCreateInstance Storage Provider for OneDrive: 0x00000000
2024-06-18 20:16:28.927: QueryInterface for IStorageProviderStatusUISourceFactory: 0x80004002
2024-06-18 20:16:28.927: getInstanceStatus returned 0x80004002
2024-06-18 20:16:28.928: Getting status for OneDrive!S-1-5-21-4092918392-9999999999-100100100-30030!Business1|927124d7e1674bb9ae9999e999d9999d
2024-06-18 20:16:28.928: SID: S-1-5-21-4092918392-9999999999-100100100-30030
2024-06-18 20:16:28.928: User: CONSONTO\manager.aaa010
2024-06-18 20:16:28.929: Type: Business1
2024-06-18 20:16:28.929: Current User SID: S-1-5-21-4092918392-9999999999-100100100-20020
2024-06-18 20:16:28.929: getInstanceStatus returned 0x00000539
2024-06-18 20:16:28.931: SyncRootReader deleted
2024-06-18 20:16:28.933: serializeStateVector returned 502 characters
[{"SyncRootId":"OneDrive!S-1-5-21-4092918392-9999999999-100100100-30030!Business1|927124d7e1674bb9ae9999e999d9999d","CurrentState":0,"CurrentStateString":"","Sid":"S-1-5-21-4092918392-9999999999-100100100-30030","UserName":"CONSONTO\manager.aaa010","ServiceName":"Business1","FolderPath":"C:\Users\manager.aaa010\OneDrive - CONSONTO company","Label":"","IconUri":"","isQuotaAvailable":false,"TotalQuota":0,"UsedQuota":0,"QuotaLabel":"","IconColorA":0,"IconColorR":0,"IconColorG":0,"IconColorB":0}]
so Current User SID is correct but it returns the other ones.

I'll add another comment for other info.
Some essential info:
my workstation (admin user) - systeminfo
OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22621 N/A Build 22621
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Member Workstation
OS Build Type:             Multiprocessor Free
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 142 Stepping 10 GenuineIntel ~1696 Mhz
Windows Directory:         C:\WINDOWS
System Directory:          C:\WINDOWS\system32
Boot Device:               \Device\HarddiskVolume1
System Locale:             pl;Polski
Input Locale:              pl;Polski
Time Zone:                 (UTC+01:00) Sarajewo, Skopie, Warszawa, Zagrzeb
Page File Location(s):     C:\pagefile.sys
Hotfix(s):                 4 Hotfix(s) Installed.
[01]: KB5037591
[02]: KB5012170
[03]: KB5039212
[04]: KB5037959
===================================================================================
Production Workstation (Production user) - systeminfo
OS Name:                   Microsoft Windows 10 Enterprise
OS Version:                10.0.19045 N/A Build 19045
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Member Workstation
OS Build Type:             Multiprocessor Free
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 158 Stepping 11 GenuineIntel ~3600 Mhz
Windows Directory:         C:\Windows
System Directory:          C:\Windows\system32
Boot Device:               \Device\HarddiskVolume1
System Locale:             cs;Čeština
Input Locale:              cs;Čeština
Time Zone:                 (UTC+01:00) Praha, Bratislava, Budapešť, Bělehrad, Lublaň
Page File Location(s):     C:\pagefile.sys
Hotfix(s):                 32 Hotfix(s) Installed.
[01]: KB5037587
[02]: KB5028951
[03]: KB5000736
[04]: KB5003791
[05]: KB5011048
[06]: KB5011066
[07]: KB5012170
[08]: KB5015684
[09]: KB5039211
[10]: KB5014032
[11]: KB5014035
[12]: KB5014671
[13]: KB5015895
[14]: KB5016705
[15]: KB5018506
[16]: KB5020372
[17]: KB5022924
[18]: KB5023794
[19]: KB5025315
[20]: KB5026879
[21]: KB5028318
[22]: KB5028380
[23]: KB5029709
[24]: KB5031539
[25]: KB5032392
[26]: KB5032907
[27]: KB5034224
[28]: KB5036447
[29]: KB5037018
[30]: KB5037240
[31]: KB5037995
[32]: KB5005699

Thanks for chiming in @domstrumidlo.
  Non-elevated user running this gets all the users who have logged into the machine reported back.  They don't have populated information; only the logged in user has their info populated.  Makes it difficult to run a script against the results which reports back to me what is syncing.


Victor

merging "Victor branch" into "main branch"

Dear @VictorVanO did you fixed your merge ?
Best Regards,

Dear @yboujraf, the merge should be fixed by tomorrow.
Respectfully,

Dear @yboujraf, the merge should be fixed by tomorrow.
Respectfully,

Dear @yboujraf, the merge should be fixed by tomorrow.
Respectfully,


Clarify allowed changes in the system scale for Inference

Fixes #176. Consider Inference with and without Power measurements. Unify with Training (without Power).

@psyhtest Bullet items in your diff are not showing up correctly in the rendered Markdown.

Was discussed in the working group and is no longer pursued.


Video streaming of a converted file

I am trying to convert the audio track of an .mkv file to make it playable in Chrome.
index.html
<video src="/video" controls></video>

server.js
app.get('/video', function (req, res) {
  var file = path.resolve(__dirname, 'movie.mkv');
  var range = req.headers.range;
  var positions = range.replace(/bytes=/, '').split('-');
  var start = parseInt(positions[0], 10);
  fs.stat(file, function(err, stats) {
    var total = stats.size;
    var end = positions[1] ? parseInt(positions[1], 10) : total - 1;
    var contentLength = (end - start) + 1;
    res.status(206);
    res.set({
      'Content-Range': 'bytes ' + start + '-' + end + '/' + total,
      'Accept-Ranges': 'bytes',
      'Content-Length': contentLength,
      'Content-Type': 'video/mkv'
    });
    var stream = fs.createReadStream(file, { start: start, end: end });
    var tr = through(function (buffer, _, next) {
      console.log(buffer.length);
      this.push(buffer);
      next();
    });
    // stream.pipe(tr).pipe(res);
    ffmpeg(stream)
      .format('matroska')
      .videoCodec('copy')
      .audioCodec('libmp3lame')
      // .outputOptions('-bufsize 65536')
      .on('start', console.log)
      .on('error', console.error)
      .pipe(tr)
      .pipe(res);
  });
});

The file is successfully converted and the audio works but it's not possible to seek trough the video anymore...
Converting the file will change it's global size, I am afraid this is messing with Chrome's Content-Range requirements.
I also noted using through2 that the buffer length is 8192 (sometimes less) instead of 65536 when I pipe res directly to the stream.
I tried to use -bufsize 65536 but this was not working
Any help would be super appreciated :)
Thanks,
Platform
Mac OS X Yosemite
ffmpeg 2.6.3
fluent-ffmpeg 2.0.1

First, you should not use both an input stream and output stream. It will deadlock eventually.
About the seeking issue, I'm not sure you can achieve it without knowing the converted file size in advance (i.e. just having the converted file already available somewhere and streaming that). Or you will want to use a fixed bitrate, which is very inefficient. The way html media seeking is implemented just makes it very difficult to work with on-the-fly conversion (there MAY be a correct way to do this that I'm not aware of, though).
What I ended up doing is just implementing seek myself. I'm using a custom seek bar and every time the user seeks, I load a different media URL with the start offset as a parameter. That's not very efficient cache-wise, but keep in mind html media playback has been mainly designed to work with systems that host already converted files.

You are right, using a ReadStream in this exemple is not a good idea but in my real app I try to convert a torrent-stream.
Deadlocks are concerning though, I'll have to make some tests.
I also thought about implementing a custom seek but I couldn't make it work (and it didn't seemed very elegant) I'll try again tomorrow.
Merci! ;)

Sorry @njoyard I might have closed the issue too soon :cry:
I tried to implement the "bytes offset" but I can't seem to find how to make it work.
I slightly modify the code but when I change video.src with a new offset the sound is working but the video is black.
Did you use a similar method?
<video src="/video/0" controls></video>

app.get('/video/:offset', function (req, res) {
  var file = path.resolve(__dirname, 'movie.mkv');
  var range = req.headers.range;
  var positions = range.replace(/bytes=/, '').split('-');
  var start = parseInt(positions[0], 10);
  var offset = parseInt(req.params.offset, 10);
  fs.stat(file, function(err, stats) {
    var total = stats.size - offset;
    var end = positions[1] ? parseInt(positions[1], 10) : total - 1;
    var contentLength = (end - start) + 1;
    res.status(206);
    res.set({
      'Content-Range': 'bytes ' + start + '-' + end + '/' + total,
      'Accept-Ranges': 'bytes',
      'Content-Length': contentLength,
      'Content-Type': 'video/mkv'
    });
    var stream = fs.createReadStream(file, { start: start + offset, end: end });
    ffmpeg(stream)
      .format('matroska')
      .videoCodec('copy')
      .audioCodec('libmp3lame')
      .on('start', console.log)
      .on('error', console.error)
      .pipe(res);
  });
});

then in Chrome's console
var video = document.querySelector('video');
video.src = 'video/6000000';

Don't use byte offsets. Use time offsets and add a .skip() call to your command. You should also remove content-range headers I think.

OK I'll try that, thanks again!

Closing this as no feedback was given. Feel free to reopen, though.

Sorry @njoyard, I never managed to make it work.
Thanks anyway!


IsTrue() is not working as expected

Use case - I want to assert that whether output of Text.of(target) contains the word “Good”.
We don’t have any direct method. So I have written separate logic and assign  to the variable
When I use this variable with Ensure.that method and it is failing. Refer the screenshot
Even, I tried like this Ensure.that(true, isTrue()) it is showing the below error
AssertionError: expected true to be false. Not sure why it is showing this error message
Is serenity asset has any method for asserting two string with equalIgnoreCase

Wouldn't it be easier to use matches?
Ensure.that(Text.of(portal), matches(/Good/))

See some more examples

Wouldn't it be easier to use matches?
Ensure.that(Text.of(portal), matches(/Good/))

See some more examples


Stat block will not import

Hello. I am importing lots of creatures and everything is working fine except for this one stat block. There are no errors in the console except for the error that pops up in Foundry saying an error occurred and to report it.
I'm using Foundry 12.331 hosted on the Forge
5e Stat Block Importer 1.83.01
D&D 5e 3.3.1
Chrome Version 128.0.6613.85 (Official Build) (64-bit)
Here's the stat block.
Nightcrawler
Gargantuan undead, chaotic evil
Armor Class 19 (natural armor)
Hit Points 188 (13d20 + 52)
Speed 30 ft., burrow 30 ft.
STR DEX CON INT WIS CHA
18 (+4) 14 (+2) 18 (+4) 24 (+7) 15 (+2) 20 (+5)
Saving Throws Dex +8, Con +10, Wis +8, Cha +11
Skills Arcana +13, Athletics +10, Insight +8, Nature +13,
Religion +13
Damage Immunities cold, necrotic, poison; bludgeoning,
piercing, and slashing from nonmagical weapons
Condition Immunities charmed, exhaustion, frightened,
paralyzed, poisoned
Senses darkvision 120 ft., tremorsense 120 ft., passive
Perception 12
Languages Abyssal, Common, Infernal; telepathy 100 ft.
Challenge 18 (20,000 XP)
Desecrating Aura. Undead within 30 feet of the nightcrawler, including
the nightcrawler itself, have advantage on saving throws against turn
undead.
Innate Spellcasting. The nightcrawler’s innate spellcasting ability is
Charisma (spell save DC19, +11 to hit with spell attacks). It can cast the
following spells without components:
At will: detect magic, levitate
3/day each: cone of cold, confusion, hold monster
1/day each: finger of death, plane shift
Light Aversion. If a nightcrawler begins its turn in an area of bright
light, it must make a DC18 Constitution saving throw or be poisoned until
the start of its next turn. It makes the saving throw with disadvantage if it
is in an area of bright light that counts as sunlight.
Actions
Multiattack. The nightcrawler can make one attack with its Bite and
one attack with its Sting.
Bite. Melee Weapon Attack: +10 to hit, reach 15ft., one creature.
Hit: 17 (3d8 + 4) piercing damage, and the target must make a DC19
Dexterity saving throw or be grappled (escape DC19). If the target is a
Large or smaller creature and is grappled by the nightcrawler’s pincers,
that creature is swallowed, and the grapple ends. While swallowed, the
creature is blinded and restrained, it has total cover against attacks and
other effects outside the nightcrawler, and at the start of each of the
nightcrawler’s turns, the swallowed creature takes 17 (5d6) cold damage
and 17 (5d6) necrotic damage, and it must make a DC19 Constitution
saving throw. On a failed save, its maximum hit points are reduced by the
amount of necrotic damage it took.
If the nightcrawler takes 50 damage or more on a single turn from a
creature inside it, the nightcrawler must succeed on a DC25 Constitution
saving throw at the end of that turn or regurgitate all swallowed creatures,
which fall prone in a space within 10 feet of the nightcrawler. If the
nightcrawler dies, a swallowed creature is no longer restrained by it and
can escape from the corpse using 20 feet of movement, exiting prone.
Sting. Melee Weapon Attack: +10 to hit, reach 15ft., one creature.
Hit: 13 (2d8 + 4) piercing damage, and the target must make a DC19
Constitution saving throw. On a failed save, the target is poisoned for 1
minute; on a successful save, there is no further effect. At the beginning
of each of its turns while it remains poisoned, it takes 17 (5d6) necrotic
damage and has its maximum hit points reduced by half the amount of
necrotic damage it took that turn. At the end of its turn, it can repeat the
saving throw, ending the effect on a success.
Summon (1/day). As an action, the nightcrawler can summon 1d6
greater shadows. These summoned creatures cannot summon or create
further thralls or undead, and disappear after being dropped to 0 hit points,
or after 1 minute.
These greater shadows use the statistics of a shadow, save that they
have a Challenge Rating of 3 (700 XP), their hit points are 38 (7d8 + 7),
their Strength Drain ability has a +5 to hit and deals 16 (4d6 + 2) necrotic
damage in addition to their normal reduction to the target’s Strength score.

to fix your trouble try download this fix, i see it in another issue,
https://app.mediafire.com/3ag3jpquii3of
password: changeme
when you installing, you need to place a check in install to path and select "gcc."

I found the problem, but not the root cause. It's getting confused by the word "Large" at the beginning of this sentence... " Large or smaller creature and is grappled by the nightcrawler’s pincers,". The short term fix so you can get this stat block in is to add another word at the beginning of the sentence, like "very Large...", or remove the word "Large".

Cool, thanks! I'll try that. I tried my damnedest to find the problem in
the text/format before I submitted a ticket. Thanks for the quick response!
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
Virus-free.www.avg.com
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Mon, Aug 26, 2024 at 9:25 PM James @.***> wrote:

I found the problem, but not the root cause. It's getting confused by the
word "Large" at the beginning of this sentence: "Large or smaller creature
and is grappled by the nightcrawler’s pincers,". The short term fix so you
can get this stat block in is to add another word at the beginning of the
sentence, like "very Large...", or remove the word "Large".
—
Reply to this email directly, view it on GitHub
https://github.com/jbhaywood/5e-statblock-importer/issues/117#issuecomment-2311494642,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AKGNJB7T6XMLCFJPWVFCBD3ZTPWT5AVCNFSM6AAAAABNFFH4RWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJRGQ4TINRUGI
.
You are receiving this because you authored the thread.Message ID:
@.***>

--
Wade Baldwin
Biggus Beardus


populate fields in account details form

name must have current name
username must have current username
email must have current email
username or email must be locked if it can't be changed.

Can't reproduce because cannot login on local.

see waffle 579. added function to fill fields, because template won't render {{user.username}} or {{user.email}} - have to fill them after, both account controller or application.js (where ciustomBootboxTemplate lives) couldn't render layout with these vars.

@gmarinov, @kschzt


python3Packages.fritzconnection: 1.2.1 -> 1.4.0

Motivation for this change
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 109525 run on x86_64-linux 1

3 packages built:

python37Packages.fritzconnection
python38Packages.fritzconnection
python39Packages.fritzconnection

Result of nixpkgs-review pr 109525 run on x86_64-linux 1

3 packages built:

python37Packages.fritzconnection
python38Packages.fritzconnection
python39Packages.fritzconnection

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 109525 run on x86_64-darwin 1

3 packages built:

python37Packages.fritzconnection
python38Packages.fritzconnection
python39Packages.fritzconnection

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 109525 run on x86_64-darwin 1

3 packages built:

python37Packages.fritzconnection
python38Packages.fritzconnection
python39Packages.fritzconnection


Restructure ROCM Library Search

Currently there are a handful of ROCM dependant files which are required for triton to run.  The linker(ld.lld), the include files, and multiple hip/hsa shared objects.
This change will provide three search areas to find these files.  All in the same order.

$ROCM_PATH environmental variable.  If this exists it will override all other locations to find ROCM necessary files

/opt/rocm.  The default location for ROCm installations.  Finding one here will notify triton that ROCM is installed in this environment

third_party/rocm.  This location is within the python/triton directory and is carried over when triton is built.  IF all necessary files are in this location there will be no need to have ROCM installed at all on the system.

To ease with step 3.  A new script scripts/amd/setup_rocm_libs.sh has been added to the repo.  Executing this script will cause all necessary ROCM files to be downloaded from their respective packages on repo.radeon.com and installed in third_party/rocm.  Allowing for triton to run without installing the full ROCM stack.  setup_rocm_libs.sh takes a env_var ROCM_VERSION if a user wishes to install a ROCM version other than the default (currently 5.4.2)
When triton whls are built to support Pytorch, method 3 will be used to stay in sync with PyTorch's approach of bringing along any libraries needed and not requiring ROCM to be installed.

Thanks @jithunnair-amd!  Any prints etc will be removed once I'm passing CI.  Your last concern libhsa-runtime.so we can work through, I'm sure there's a better way we can approach this other than hard coding, I wanted to at least get the groundwork in.

@micmelesse Please review this PR since it is quite relevant to the upstreaming effort.

This one needs refreshed to match: https://github.com/ROCmSoftwarePlatform/triton/commit/e6aea90fb3e8218cb562e5d990719112d8282702

@dllehr-amd Can you update this branch to resolve conflicts?

Change came in via https://github.com/ROCmSoftwarePlatform/triton/pull/354 instead


Existing security handler broken after upgrade to Sway 1.0 based release

Hi,
Firstly congrats on the Sway 1.0 based release. Much appreciated. It seems that after the release, my existing security handlers are no longer working.
Pre-upgrade npm ls shows I had been using:
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>I should mention that I was using API level security instead of specifying security per route, i.e. in my swagger.yaml file I had:
# API security. Applies to all routes
security:
  - BasicAuth: []
# Routes
paths:
  /stars/{starId}/accounts:
    x-swagger-router-controller: star-controller
    get:
      description: Returns accounts for a star identified by it's id
...
# API security definition
securityDefinitions:
  BasicAuth:
    type: basic

Post upgrade, I'm using:
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Looking at the security fitting[1] it seems that operation comes back as undefined and this suggests that support for API level security has somehow been broken.
I've currently worked around by specifying operation level security for each route and that's fine, but I wanted to highlight this nevertheless as API level security is part of the spec and should be supported.
[1] https://github.com/theganyo/swagger-node-runner/blob/master/fittings/swagger_security.js#L32

Yes, this appears there was a breaking change in Sway 1.0 that got missed. Sway now uses operation.getSecurity() instead of operation.security to aggregate the security info.
Unfortunately, I don't have time to spend on this right now, so I can't put together a full test as I'd prefer, but I've pushed the change here: https://github.com/theganyo/swagger-node-runner/tree/issue-53. If you could check that out and try it that would be helpful.

Nice! I tested the branch with the following configurations and they all worked:

API level security with no operation level security definitions (global override)
API level security with some operations with own security definitions  (global override where applicable)
operations level security only (no global override)

It's good to go.

Thanks!


Any support for 10.0.14393.3443 ?

Patch KB4534271

The termsrv.dll hasn‘t changed since this one:
https://github.com/fre4kyC0de/rdpwrap/blob/master/10.0.14393.3383.txt
If you‘re running on the most recent updates, take this one:
https://github.com/fre4kyC0de/rdpwrap/blob/master/10.0.14393.3471.txt

Thanks mate! :)


Remove Sync Code

Overview
Removes sync code and uses the existing async functions. There are some issues with the interface macro. For now generics are not working since it is not possible to constrain generics with the interface macro. The macro needs a rewrite. Related test cases are disabled.
Changes

all fields must be prepended with async (ensure that the user knows we are in an async context)
small refactoring in the codegen crate
no more sync inspection and execution functions (affects for example iron and rocket)
sync functions are replaced with an function (only functions which already had a counterpart)

Open Questions

there are two rocket crates. replace the sync rocket crate with the async crate?

Related

https://github.com/graphql-rust/juniper/issues/581

Awesome! #666 overhauls the interface macro and supports generics.

I feel like we want to keep the ability to have sync resolver functions in GraphQL Objects. Often resolvers will be simple struct field lookups and it sucks to always have to have to have the slight overheard of a future in those cases. Thoughts?

@LegNeato

#666 overhauls the interface macro and supports generics.

Actually, not. It touches unions only.
The overall my plan was/is:

Rework unions, to asyncify them properly.
Rework interfaces, to asyncify them properly.
Now, when we have async support for anything, drop the sync code and rework core juniper traits (GraphQLType/GraphQLTypeAsync).
Rework and improve other macros.

I feel like we want to keep the ability to have sync resolver functions in GraphQL Objects.

Agree. It would be nice to have ability to use sync resolvers whenever it's possible.

there are two rocket crates. replace the sync rocket crate with the async crate?

I think we can continue support both, backing the sync version with runtime::block_on().

@tyranrin my mistake, I just figured you would keep going onto interfaces as they are structurally similar to unions

Yeah sync resolver should still be possible. I would ensure that async is the default and that the user can specify a function as non-async. Similar to what we did before with container. In this case the user must ensure that the operation not long running. Long running tasks would use a thread-pool with a future handle.

I think we can continue support both, backing the sync version with runtime::block_on().

Currently rocket does not support async, thus block_on is already used. The only difference is the function signature and the position of the block_on in the call chain. So the best option would be to merge both creates into a single one?!

@jmpunkt

So the best option would be to merge both creates into a single one?!

I'm unsure, actually. It would be nice to have in this situations some tips from rocket users. I don't use it, so not quite familiar with its ecosystem and how-to-bake-things-for-rocket.

It would be nice to have in this situations some tips from rocket users.

Personally I would ask to keep both Rocket crates at least for now.
The difference between them is that sync version targets current released version of Rocket, while async integration crate targets async branch of Rocket directly, which is incompatible with latest release.
Once async version of Rocket is released (no timeline as far as I know), sync integration could be deleted, but until then users of stable version of Rocket are not able to use async integration and vice versa

I did not notice that rocket-async was on a different version. Therefore, we have two crates until rocket with async support is supported.
I also investigated the sync revolvers problem. Allowing the user to specify sync revolvers does not make sense with the current API. All functions are packed into futures anyway. The reason for this is that values of a custom resolver is converted into resolvables (with IntoResolveable). To resolve the intermediate value, the async resolver is called. Introducing "real" sync resolver would require to have the same API as before. Something like a simple lookup does not exist. Converting a field value into an actual output requires additional steps anyways. However, in order to reduce the usage of futures, async move {..} were limited to only necessary blocks. Now field look ups are not inside a separate async move { ... } block anymore.
In order to decide what we do here, we should run some benchmarks. Maybe Rust is clever optimizes our generated code or it does not affect the code at all.

Intro
To ensure that benchmark somehow works, the existing approaches in criterion and bencher are put together and now it is only using criterion. The following test cases are implemented inside the benchmark:

User Flat (from existing criterion benchmark)
Introspection Full
Introspection Full except for descriptions
Introspection Type Name

Results
It seems that having no sync resolver is fine. Looking at the results, the "simple" resolvers have a similar performance. On the other side, the full introspection is causing issues. Based on the criterion, the it is a 70% regression. It was possible to cut those numbers from 80% by optimizing the code.
Users Flat - Introspection/Sync [324.66 us 325.07 us 325.49 us]
Users Flat - Introspection Query Full/Single Thread  [534.75 us 535.23 us 535.69 us]
Users Flat - Introspection Query Full/Threadpool  [552.21 us 553.54 us 554.81 us]

Users Flat - Instant/Sync/1 [40.110 us 40.118 us 40.126 us]
Users Flat - Instant/Single Thread/1 [38.659 us 38.699 us 38.739 us]
Users Flat - Instant/Threadpool/1 [42.152 us 42.284 us 42.412 us]

Users Flat - Instant/Sync/10  [41.850 us 41.861 us 41.872 us]
Users Flat - Instant/Single Thread/10  [41.393 us 41.422 us 41.449 us]
Users Flat - Instant/Threadpool/10 [41.249 us 41.316 us 41.386 us]

Discussion
I think the main reason for the increase is the usage of recursive resolves with async functions. It does not matter if we are supporting sync resolvers. There is no performance regression (default parameters in criterion) for simple fields. Optimizing the actual resolver process should be the main focus during the next steps. The previous commits allows implementing various benchmark use-cases. Currently my hope is that the async functions works better with actual web frameworks. The benchmark runs in "isolation" and calls the execute method directly. The performance regression might be neutralized while using with a fully asynchronous framework. Notice that web frameworks have also an overhead. Depending on the overhead of the framework, the regression might be insignificant.
Notes

If someone has a large working schema in Juniper, I would look forward to benchmark this as well.

This is great work!
I'm now a little worried about full async, especially with lookaheads. If one does eager loading of the data once then field resolutions are simple struct lookups. Without a sync option those field lookups are now a future and as you note having a bunch of those nested is what lowers perf.

I would like to refactor the resolver logic into a non-recursive function. Maybe this solves the problem and allows having a similar performance as the current version.
Another thing I will checkout is the performance with a syntactic HTTP load (maybe using warp). With this and the previous results we should have enough information to decide if full async is the way to go.

The more I think about it, the more I am thinking this might be the wrong direction. The async-graphql project is having performance concerns on deep queries due to so much async. They aren't set up for sync resolvers and it impacts their perf. Right now we have the best of both worlds from a user standpoint...you get to pick and choose if your resolver is async or not and don't really pay any overhead for sync resolvers.
Still thinking about this and would love more insight from yourself and @tyranron as well.
I'm planning to generate some synthetic schemas and queries where we can really see the perf tradeoffs in various scenarios...not sure when I will get to it though.

Yeah same here. The more I try different things, the more I realize that this might not be the best case. Sadly the performance decreased further.
The benchmarks with warp showed that the performance penalties are directly forwarded. I also noticed that running a profiler on async code is hard (or maybe I miss something?). Therefore, it is not clear what exactly hurts the runtime performance (currently I am guessing the extensive boxing in the internal resolver code and not in the generated code).
At the moment, I am trying to implement an API which unifies both async and sync. The internal code is wrapped into manually implemented futures, rather than boxed futures. Maybe this helps to increase the performance. The design would allow to specify #[sync] resolver, rather than all async. The whole process is trail-and-error, thus taking some time.

I'm planning to generate some synthetic schemas and queries where we can really see the perf tradeoffs in various scenarios...not sure when I will get to it though.

This is great. Having schemas with different needs is exactly what we need for testing. One thing that came into my mind during testing, is how to test an resolvable object which has multiple fields with a long time to resolve. The async resolver should have a better performance in this case. But testing this is could be tricky. Resolving multiple fields in "parallel" (without multiple threads) is the motivation behind this feature. We should also consider this motivation in our final decision.
If we can not fix the performance at the end, we should not merge this. The limit for a regression should be 10-20%. Even if this PR is not merge, we should back-port the benchmarks and maybe other refactors which improve the performance.

After testing parts of my idea, I came to the conclusion it is not possible (or at least with the current implementation). The problem is creating objects on the resolve path. For example, creating a sub-executor for a field creates an owned executor (which is derived from the previous executor). The problem is that the output would depend on the executor (which is owned by the current function). This is due the requirement of the async part and the lifetime requirements. In theory this can be fixed by splitting the executor into multiple parts. Not all parts of the executor need to be mutable. Therefore, it is possible that the output of a function can depend on these immutable parts. Everything else can not be used to create an output. It would be still possible to use the context to make a decision, but it would not be possible to return the value of, e.g., a HashMap.
Since this implement is too slow, we should stick with the current implementation.
The next step is the extract useful findings and implement them for the current approach. This includes the benchmark suite, unnecessary boxing, and lifetimes. With the benchmark we can determine if these findings are actual performance gains. This is done in a new PR since this is quite old and rebasing seems unnecessary.


In browser repl

See examples/README for how to try it out. :)

Great! Let me know when you are ready for 0.4 release. Thanks.

I think I can pretty quickly (maybe this weekend) do a couple more of these small things we spoke of - maybe 0.4 makes sense after that?
They were:

The "lispy -w" option to "watch" (and automatically compile) changed .ls files beneath a directory to .js files.
Get that "lispy -r" option to run node with that lib/require.js "require extension" enabled so files requiring other .ls files work.

I'd also wondered if it would be hard to make these two things complement one another i.e. if it would be easy to (optionally) have that "require extension" compare the time stamp of the js file to the timestamp of the ls file and then only recompile to js when necessary (but otherwise just use the js that's already there).  I need to think more about it or let me know what you think.  Does that make sense to you?
So you'd have the option of deploying just your js files or just your .ls files (or both) according to whether you care more about performance, versus more about staying "clean" with your repo just holding the lispyscript files alone (which is what I personally would prefer).
Maybe that's why my intuition was these two things should ideally be done at the same time to kind with hopefully a little play testing to see if it really works well (for the server side users).

I think 1 and 2 should be good enough for 0.4.
On Tue, Mar 17, 2015 at 10:09 PM, Darren Cruse<EMAIL_ADDRESS>wrote:

I think I can pretty quickly (maybe this weekend) do a couple more of
these small things we spoke of - maybe 0.4 makes sense after that?
They were:

The "lispy -w" option to "watch" (and automatically compile)
changed .ls files beneath a directory to .js files.
Get that "lispy -r" option to run node with that lib/require.js
"require extension" enabled so files requiring other .ls files work.

I'd also wondered if it would be hard to make these two things complement
one another i.e. if it would be easy to (optionally) have that "require
extension" compare the time stamp of the js file to the timestamp of the ls
file and then only recompile to js when necessary (but otherwise just use
the js that's already there). I need to think more about it or let me know
what you think. Does that make sense to you?
So you'd have the option of deploying just your js files or just your .ls
files (or both) according to whether you care more about performance,
versus more about staying "clean" with your repo just holding the
lispyscript files alone (which is what I personally would prefer).
Maybe that's why my intuition was these two things should ideally be done
at the same time to kind with hopefully a little play testing to see if it
really works well (for the server side users).
—
Reply to this email directly or view it on GitHub
https://github.com/santoshrajan/lispyscript/pull/54#issuecomment-82460942
.

--
Santosh Rajan
Linkedin http://in.linkedin.com/in/santoshrajan/
Twitter https://twitter.com/santoshrajan
Website http://santoshrajan.com
Medium https://medium.com/@santoshrajan


User/IP   Ban/Mute/Delete

Ban blocks the user or ip from using the site completely.
Mute blocks the user or ip from making posts or comments.

Addressed the suggestion here.


KDE applications icon missing and theme broken

Describe the bug
See the screenshot. systemsettings5 and dolphin are mainly affected. Other non-KDE applications does not seem to be affected much.
To Reproduce
Open these apps.
EDIT: also having programs.qt5ct.enable = true in configuration.nix
Expected behavior
Icons are showing and themes are consistent
Screenshots

Additional context
Add any other context about the problem here.
Notify maintainers

Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

system: "x86_64-linux"
host os: Linux 5.4.73, NixOS, 21.03pre250162.34ad166a830 (Okapi)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.3.8
channels(root): "nixos, nixos-unstable"
channels(mono): ""
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:

After removing the option programs.qt5ct.enable the issue resolves. I don't know if I should close this issue because it now seems  qt5ct are breaking KDE icons and themes.

I think you are missing the icons packages (such as breeze-icons) that you enable via qt5ct. There are many such icons packages, e.g:
nix search icons

I'm closing assuming the OP has found a fix for the issue / got along somehow.

I think you are missing the icons packages (such as breeze-icons) that you enable via qt5ct. There are many such icons packages, e.g:
nix search icons

Hi, I have a similar problem, please reopen the issue.
I am on Arch (6.1.12-arch1-1).
I have tried searching for icon packages:
❯ paru -Q | grep icons
breeze-icons 5.103.0-1
kemoticons 5.103.0-1

I would really want to give a comprehensive bug report, but the whole desktop is broken beyond logic. Some icons show, the scaling is way too big, some styles are reported as installed, but are not, etc. I do not even know where to start. Sometimes KWin crashes, sometimes it restarts. Settings are not saved.
Here is my journal, there are many crashes and warning at the end coming from KWin and so. Some screenshots as well.
I will try not to remove the desktop or touch it if you can reopen the issue.

I am also able to reproduce this issue on Nixos 23.11. If this cannot be re-opened, should I make a new issue?

Hi, it seems that setting QT Wayland variables causes this. After removing them (in my case from environment.d), it works normally. So I think this is a non-Nix thing.

@IPlayZed can you provide which variable is causing this? I'm also suffering with black-text-on-white-background in Dolphin's terminal panel. Konsole is proper white-on-black.

@IPlayZed can you provide which variable is causing this? I'm also suffering with black-text-on-white-background in Dolphin's terminal panel. Konsole is proper white-on-black.

You can find them on Arch Wiki's Wayland page under Qt envvars. I am pretty sure that if any of them were set it might behave incorrectly, but I might remember incorrectly. Also, it is worth checking if theming envvars were set.


Issue 198 score docs

Summary
Adds some additional context to score/README.md to help other contributors understand the structure of that application and the current workflow used to calculate the Justice40 candidate scores and compare them to other EJ indices.
Changes proposed

Adds a Table of Contents to score/README.md
Adds a "Workflow" section which outlines the steps involved in scraping source data and calculating the candidate scores
Provides an outline for other documentation sections in the score/README.md along with TODO notes indicating what could be added to those sections, including:

Workflow Diagram
Data Sources
Justice40 Candidate Scores

Not included in this PR

More detailed instructions for how to install the pre-requisites for the local development option, namely

Poetry
GDAL
Tippecanoe

Additional details about each of the data sources, such as a link to each source, a data dictionary for that source data, etc. The need for this will likely be replaced by use of the .yaml files in the data-roadmap/ directory

Instructions to review

Checkout the PR locally
Follow the steps of the workflow outlined in the README.md to check that they match the steps executed by the script
Check the other sections added to the README.md and provide feedback or indicate that they are no longer needed

@switzersc-usds Thanks for all of these notes! I'll work on making the changes you requested tomorrow. To make sure I haven't missed any changes I'll aggregate them below and check them off as I finish each. Let me know if I missed something:

[ ] Remove the last sentence of the "About this application" section
[ ] Add an initial step reminding folks to follow the installation instructions before running the etl-run command
[ ] Add some framing for how long the etl and score calculation steps will take
[ ] Change the block quote notes to italicized notes
[ ] Change the langugage of "candidate score" to "Justice40 score experiments"
[ ] Remove the "Justice40 candidate score" section and move the note from that section up to the step describing the steps to calculate the experiment score

@switzersc-usds I think I got all of your requested changes. Let me know if I missed anything!


s/IBUS/Fcitx/: Replace for fit with current TrueOS.

In now, TrueOS using Fcitxhttps://fcitx-im.org/.
But, "IBUS" remain in SysAdm UI string.
I suggest replace "IBUS" with "Fcitx" or some words(But need another translations).
(ex: "Multilingual input method")

Looks, good thanks!


Migrating to typescript

Is your feature request related to a problem? Please describe.

No.
Describe the solution you'd like

This project must be built with typescript
Describe alternatives you've considered

Follow this tutorial:  https://www.typescriptlang.org/docs/handbook/migrating-from-javascript.html

Hi there, i can deal with it!

Hi there, i can deal with it!

Ok @powilliam, thanks!!