fixed the async issue in the basic example in the readme

I tired to fix the async issue in the Basic Example. But i'm a newbie programmer, so please check before accepting it, and i would be really happy if you would accept it. thanks <3 (i tested the code on my machine, it worked.)

i added the space 🥇


Challenge data does not exist

Should I setup the challenge data by myself? what does these data include?
ctfd_1   | Challenge data does not exist: 2, test_d, test03
where raises the error: https://github.com/pwncollege/pwncollege/blob/c16ffd481b278967162ada76193f5a42fb4459a0/CTFd_plugin/docker_challenge.py#L103

also, i think https://github.com/pwncollege/pwncollege/issues/15#issue-824244519 is caused due to this ""Challenge data does not exist"" issue

I copy the bin files to .data/challenges/global , and it should work


Copy text in readOnly 'nocursor' mode

Hi, i can copy text in readOnly:true mode(although it's not stable with context menu and also i see 'past' in it).
But i don't need cursor. And in readOnly:'nocursor' mode i can not copy at all.
Can you do it?

You can hide the cursor by setting cursorBlinkRate to a negative number in the options.  Not sure if this was the case when you posted this, but I'm adding this since I found this post by Googling CodeMirror hide cursor and later found the answer.


Created a module rational-package to manage emacs' package-managers

This is an attempt to modularize package installation, according to what I have seen it is been used so far in rational-emacs.
It adds support for straight.el, and the capacity to add other package-manager systems as backends.
I hope that my desition to put the backends in a subdirectory doesn't offend people. If you have a better solution, I would hear you.
This module tries to aim into the granularity issue mentioned in a live stream.

Just seen issue #187. Will wait if it needs to first go through renaming process.

Just realized that I forgot to add the main module to the PR. Sorry.

Great! Thanks. Let me work on it.

I think it's done…

Unfortunately, had to revert this one.
The problem is the (require 'crafted-emacs) in the early-init.el file: it doesn't know how to load that file as the modules folder is not on the load-path yet (it is added in init.el). So bootstrapping the package system this way fails and causes Emacs to not load.
Will investigate options.

@abarocio80 please review #201 where I have refactored a bit of this code. Thanks for your effort on this PR!


Support panning using a touchpad or scrollwheel

This could use some testing on non windows devices.
Replaces PR #440.
Unfortunately I could not get zooming to work on touchpad too, and I don't know whether to blame the OS or JavaFX for that.

Seems to work on Linux - I can pan in both directions with two-finger touchpad scroll.
Would it make sense to add a 'reverse scroll direction' preference option? It feels a bit more natural to me reversed, but I think that would very much be a personal preference thing.

wandernauta

I think adding a preference option for reverse scrolling is a good idea that would require much extra work to implement. Some people just really prefer scrolling one way or the other so it could help with the usability of the program.

I will add a preference. What is the commonly agreed default on this?

I think the direction you're using in this PR (positive scroll) is a reasonable default.

At least on Mac, the reverse scroll thing is an OS setting, and doesn't
need handing by the app
On Wed, Apr 13, 2016, 09:09 Wander Nauta<EMAIL_ADDRESS>wrote:

Seems to work on Linux - I can pan in both directions with two-finger
touchpad scroll.
Would it make sense to add a 'reverse scroll direction' preference option?
It feels a bit more natural to me reversed, but I think that would very
much be a personal preference thing.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/viskell/viskell/pull/441#issuecomment-209264738

I have tested on Mac.

works fine, direction is the direction set by the OS
I checked that if you switch the OS scroll behaviour it switches also, so no further changes needed there

I notice that if you have the cursor on top of a popped-up toolbar, then the scrolling doesn't work....I assume because it's on top of the layer that where you are processing the scroll events....the toolbar layer must consume them.
To fix I guess you'd need to handle scroll events on the top (touch?) layer, OR, make sure the toolbar doesn't consume scroll events and they fall through to the lower layers.
In my branch for scrolling, I did the initial displacement of the background (as you suggested) so it is harder to get to see the white border. Maybe could do too?
A better fix, would be if we had scrolled to the edge of the canvas and not allow scrolling beyond it...so you can never see the white.
Same thing for zoom out, I thought if we zoom out beyond the size of the canvas, then trancate position to extent of canvas and avoid seeing the white around it.

The toolbar had a overreaching eventhandler consuming scroll event, which is fixed in last commit.
I didn't change displacement now, because whether that is needed depends on the resolution of #439.
Limiting the scrolling to the edge of the canvas is a separate issue, which has multiple possible design alternatives.

+1 Fine to merge for me then.


--help flag doesn't work

Bug description
The flag option seems to be defined in the cli.ts file, but somehow I'm not able to execute with flag --help, -h nor plain h.
I have installed ts-to-zod with pnpm, pnpm add -D ts-to-zod.
Input
ppyrz@DESKTOP-GDDHMQI MINGW64 ~/Dev/Projects/anyAssetClient (main)
$ pnpm exec ts-to-zod
 »   Error: Missing 1 required arg:
 »   input file (typescript)
 »   See more help with --help

ppyrz@DESKTOP-GDDHMQI MINGW64 ~/Dev/Projects/anyAssetClient (main)
$ pnpm exec ts-to-zod --help
 »   Error: Parsing --help
 »      Command tstozod not found.
 »   See more help with --help

ppyrz@DESKTOP-GDDHMQI MINGW64 ~/Dev/Repos/ts-to-zod (main)
$ ./bin/run --help
 »   Error: Parsing --help
 »      Command tstozod not found.
 »   See more help with --help

ppyrz@DESKTOP-GDDHMQI MINGW64 ~/Dev/Repos/ts-to-zod (main)
$ ./bin/run --config example
✔ Validating generated types
🎉 Zod schemas generated!

Expected output
A list of flag options available to the CLI, was looking for a way to avoid a config file at root level and instead specify my config path as a flag in a package.json script
Actual output
$ ./node_modules/.bin/ts-to-zod --help
 »   Error: Parsing --help
 »      Command tstozod not found.
 »   See more help with --help

Versions
Windows 11, tested with cmd and git bash.

tsc: 4.8.4
Zod: 3.6.0
pnpm 8.14.1

duplicate of https://github.com/fabien0102/ts-to-zod/issues/196


fix path for OneQubitEulerDecomposer for qiskit 1.0

Summary
The import path of the OneQubitEulerDecomposer has changed in 1.0.
Details and comments

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 43.088%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
2902

Relevant Lines:
6735

💛  - Coveralls

Thanks @ewinston, that import is already handled in #804


Consider creating pages in different languages for the site?

Although mainstream browsers already have some page translation capabilities, they are not good enough, and the localization effect of translation is also relatively poor.
Would you consider providing multilingual options for the site? Forms for example https://airsdk.dev/zh_CN https://airsdk.dev/fr_FR

Definitely in the plans, however will rely on the community to translate and maintain the pages. I'll do some research into how it should be setup but initially I'm focused on getting a decent set of documentation together in a single language.


question: how to use Reduced Security?

I use an application that needs Security Policy to Full Security or Reduced Security. When I change it to reduced security it enables SIP. Is there any way I can use Reduced Security and keep SIP disabled (even partially)?

MacOS: Ventura 13.1

Somebody else can correct me but reduced security im pretty sure is only if you use older versions of macos. Reduced security isn't available when sip is disabled. Sip disabled is considered permissive security.

disabling single SIP features implies permissive security as I understand the apple docs:
https://support.apple.com/guide/security/startup-disk-security-policy-control-sec7d92dc49f/web

Closing this since i don't have time to troubleshoot it. I just removed that app. :/

I think it still needs to be resolved. @koekeishiya would you mind to look?


cannot build disp_driver.c

Describe the issue
Cannot build
Compilation warnings/errors (if available)
../components/lvgl_esp32_drivers/lvgl_tft/disp_driver.c:20:5: error: implicit declaration of function 'ili9341_init';
It looks it is adding this file and it shouldn't? because disp_driver.c is inline included in lvgl_driver.c

Hi,
Are you selecting a predefined display configuration on the menuconfig or selecting every option by yourself? I'm working with the Wrover Kit v4.1 preconfiguration (it have the ILI9341 display controller) and i can't reproduce the issue.

I'm assigning the PINs myself on the "Display Pin Assignments"
The predefined options are set to "None"
but I should note that CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_ILI9341 is set
so this issues is because that .c file is included and there is no include to this define.
but I think thats ok because it should be excluded from the build list? ..

I found the issue, It was my fault! I deleted by mistake the includes that are need to this esp32 port in the config.h

Don't worry, happy to know you solved it.


ERROR: Could not find a version that satisfies the requirement openvino (from versions: none)

Whenever I try to install the requirements I get this error (Python 3.11):
ERROR: Could not find a version that satisfies the requirement openvino (from versions: none)
ERROR: No matching distribution found for openvino

Intel OpenVINO has not supported Python 3.11 yet.
3.10 is ok in my case.


Code scanning alert on escapeHash

Before submitting...

[X] I have searched for duplicate or closed issues.
[X] I have read the CONTRIBUTING document and my issue is following the guidelines.
[X] I have read the template completely before filling it in.

Context
/js/global.js contains the function escapeHash()
I enabled Code Scanning with CodeQL in my GitHub project and the following came up:
Incomplete string escaping or encoding
return hash.replace(/(:|\.|\[|\]|,|=|\/)/g, '\\$1');
This does not escape backslash characters in the input.
References: CWE-20, CWE-80 and CWE-116
Current Behavior
No response
Expected behavior
Should also escape backslash characters in the input
Possible Solutions or Causes
Is it a false positive or a real warning?
Your Environment

Version used: 1.1
Browser Name and version: n/a
Operating System and version (desktop or mobile): n/a
Additional information you want to tell us: GitHub code scanning with CodeQL

Hello @RamonvdW
thanks for pointing that out. I checked where it is used and found out that it is only used by Tabs.
I dont know why it is needed, probably to prevent XSS.
Thats interesting... I saw that a Tab-Content Element is added via JQuery Selector and it takes as input the href-hash of the links,
escapes it and then then uses the jquery selector with that and places it as Element in the Tab-Content-Element.
Possible solution:
Selector part with escaping should be removed and only show or hide the tab-contents,
also it is faster because the dom-html is preloaded.

I looked into it and it should be no security concern...

What can happen is that untrusted data can injected into the cash-selector via location-hash or link-hash.
I dont know if there are any vulnerabilites in the cash library.
Maybe here some interesting link: https://blog.mindedsecurity.com/2011/07/jquery-is-sink.html
Solution for me would be to remove jquery.
I dont know if the native querySelector Function has code injection issues but i think not.
At least I did not find much about it online.

no security concern.
also improved in v2-dev


Wifi-2538 : clients dropped on RRM rebalance

Set channel without reloading the wifi radio.
Signed-off-by: Ammad Rehmat<EMAIL_ADDRESS>Signed-off-by: Chaitanya Godavarthi<EMAIL_ADDRESS>

Merged f5470bf4, thanks


Stripe checkout

Proposed new or changed files:
\userfiles\modules\shop\payments\gateways\omnipay_stripe\admin.php
\userfiles\modules\shop\payments\gateways\omnipay_stripe\index.php
\userfiles\modules\shop\payments\gateways\omnipay_stripe\process.php
\userfiles\modules\shop\payments\gateways\omnipay_stripe\return.php
\userfiles\modules\shop\payments\gateways\lib\Stripe.php (new class)
\userfiles\templates\liteness\payment.php
Also version number in:
src/Microweber/functions/bootstrap.php
version.txt
Only tested payment.php with shopmag template. It maybe possible to load the form in checkout without this template but when I tested I couldn't get the Stripe checkout to load.

Out of date. Improved version being tested.


couchbase [BREAKING CHANGE]: TLS support

Adds TLS support, including client certificates.
BREAKING CHANGES:

Configuration schema - replaces couchbase_host and couchbase_management_port with couchbase_connection_string

note: multiple hosts will be accepted but only the first will be used

Adds one new method to couchbase.NodeCommon, TLSConfig() *tls.Config

Tasks:

[ ] verify it works - smoke tests will use TLS
[ ] verify mTLS works

Fixes #16

That coverage is suspiciously low (master runs get >50%) - sounds like something's broken.


QPaysTaxes: Watch hoteldealsphuket.com

QPaysTaxes requests the watch of the watch_keyword hoteldealsphuket.com. See the Metasmoke search here

!!/approve

Please remember the backslash. I have committed a fix for this particular instance, so no worries.


Add ExploratoryDataAnalysis

congratulations on your hactoberfest contribution. if you like this repo then give it a star. Happy hacking..


python310Packages.python-lsp-server: 1.7.2 -> 1.7.3

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python310Packages.python-lsp-server is: Python implementation of the Language Server Protocol
meta.homepage for python310Packages.python-lsp-server is: https://github.com/python-lsp/python-lsp-server
meta.changelog for python310Packages.python-lsp-server is: https://github.com/python-lsp/python-lsp-server/blob/v1.7.3/CHANGELOG.md
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.7.3 with grep in /nix/store/60dn8pnlg3nhyp2jggy1np7l5hij3i1p-python3.10-python-lsp-server-1.7.3
found 1.7.3 in filename of file in /nix/store/60dn8pnlg3nhyp2jggy1np7l5hij3i1p-python3.10-python-lsp-server-1.7.3

Rebuild report (if merged into master) (click to expand)

21 total rebuild path(s)

21 package rebuild(s)

First fifty rebuilds by attrpath
python310Packages.pyls-flake8
python310Packages.pyls-isort
python310Packages.pyls-memestra
python310Packages.pyls-spyder
python310Packages.pylsp-mypy
python310Packages.pylsp-rope
python310Packages.python-lsp-black
python310Packages.python-lsp-ruff
python310Packages.python-lsp-server
python310Packages.spyder
python311Packages.pyls-flake8
python311Packages.pyls-isort
python311Packages.pyls-memestra
python311Packages.pyls-spyder
python311Packages.pylsp-mypy
python311Packages.pylsp-rope
python311Packages.python-lsp-black
python311Packages.python-lsp-ruff
python311Packages.python-lsp-server
python311Packages.spyder
spyder

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/60dn8pnlg3nhyp2jggy1np7l5hij3i1p-python3.10-python-lsp-server-1.7.3 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python310Packages.python-lsp-server https://github.com/r-ryantm/nixpkgs/archive/1cb20cc435bab5215c43912afe8188682fe9ba53.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/60dn8pnlg3nhyp2jggy1np7l5hij3i1p-python3.10-python-lsp-server-1.7.3
ls -la /nix/store/60dn8pnlg3nhyp2jggy1np7l5hij3i1p-python3.10-python-lsp-server-1.7.3/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

2 packages failed to build:

spyder (python310Packages.spyder)
python311Packages.spyder

18 packages built:

python310Packages.pyls-flake8
python310Packages.pyls-isort
python310Packages.pyls-memestra
python310Packages.pyls-spyder
python310Packages.pylsp-mypy
python310Packages.pylsp-rope
python310Packages.python-lsp-black
python310Packages.python-lsp-ruff
python310Packages.python-lsp-server
python311Packages.pyls-flake8
python311Packages.pyls-isort
python311Packages.pyls-memestra
python311Packages.pyls-spyder
python311Packages.pylsp-mypy
python311Packages.pylsp-rope
python311Packages.python-lsp-black
python311Packages.python-lsp-ruff
python311Packages.python-lsp-server

Maintainer pings
cc @fabaff for testing.

@ofborg build spyder

Looks unrelated.


Update Add-RecipientPermission.md

The SkipDomainValidationFor* parameters have been removed from scope of tenant admins.

Docs Build status updates of commit 7d8d5b9:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

exchange/exchange-ps/exchange/Add-RecipientPermission.md
:white_check_mark:Succeeded
View (exchange-ps)

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit fc7b952:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

exchange/exchange-ps/exchange/Add-RecipientPermission.md
:white_check_mark:Succeeded
View (exchange-ps)

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit 2423daf:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

exchange/exchange-ps/exchange/Add-RecipientPermission.md
:white_check_mark:Succeeded
View (exchange-ps)

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Updating Agent Color Based on Action

I am trying to override an action to change the color of the agent. I created a variable named agent_state. If the agent_state is less than 0 the agent will have one color, otherwise another. I have managed to update agent_state with an action and change color seperately. But cannot integrate both together. Any pointer would be helpful.
Rendering is done as "rgb_array"
I am working on the mingrid.py file which is attached as txt.
Thanks!
minigrid.txt

I'm not sure what you mean when you say you haven't managed to integrate both together. I would suggest printing the value of agent_state and agent_color in the render_tile method. You're going to need to do some detective work.
Just a tip on using GitHub: the best way to share code to discuss things like this is if you create a fork of this repository, and then you can easily copy and paste links to specific lines of code.


Fix exponentiation operator behavior on Linux gcc 4.7+ -O2

For some reason exponentation operator behaves incorrectly on Linux with gcc 4.8.4 -O2 (-Os used for commit regression tests is fine). Symptom example:
duk> 2 ** 10
= 1024
duk> x = 2
= 2
duk> x ** 10
= 1  // <-- ?
duk> Math.pow(2,10)
= 1024

Exp at compile time works while runtime results are incorrect. The mysterious thing is that in both cases the internal function used to compute the exponentiation is the same. Also other arithmetic operations, handled by the same arith helper, work.

This issue is also GCC version specific. Gcc 4.6.4 -O2:
duk> x = 2
= 2
duk> x ** 10
= 1024

Gcc 4.8.4 -O2:
duk> x = 2
= 2
duk> x ** 10
= 1

So it's most likely related to some optimization decision (aliasing assumptions, union assumptions, for example) that GCC 4.7+ make with -O2.

Maybe an optimizer bug?

Could be, but at the outset a Duktape bug would be more likely IMO.

dukd compiled with gcc-4.8.4 and forced -O2 exhibits the issue, and managed to get this debug dump:
duk> x = 2
= 2
duk> x ** 10
D0 duk_js_arith.c:69 (duk_js_arith_pow): POW: 2.000000 0.000000
= 1

Disabling fastint support but otherwise the same:
duk> x = 2
= 2
duk> x ** 10
D0 duk_js_arith.c:69 (duk_js_arith_pow): POW: 2.000000 10.000000
= 1024

So the issue may be fastint related. Indeed, adding back fastint support and ensuring that the exponent is not a fastint:
duk> z = 0.1
= 0.1
duk> z = 10
= 10
duk> x ** z
D0 duk_js_arith.c:69 (duk_js_arith_pow): POW: 2.000000 0.000000
= 1
duk> x = 2
= 2
duk> y = 10
= 10
duk> x ** y
D0 duk_js_arith.c:69 (duk_js_arith_pow): POW: 2.000000 0.000000
= 1
duk> y += 0.1; y -= 0.1  // <-- remove fastint status
= 10
duk> x ** y
D0 duk_js_arith.c:69 (duk_js_arith_pow): POW: 2.000000 10.000000
= 1024

So, the issue is most likely in converting a fastint into an IEEE double which does use union tricks. No idea why it would manifest here but not in other arithmetic though.

I think I found the issue. The executor arith helper has a fastpath for both arguments being fastints. That fastpath handles SUB, MUL, DIV, MOD (ADD has a separate helper) but not EXP. The case clause for the fastint check has a default clause with DUK_UNREACHABLE() which is incorrect because the default clause is reached with EXP. The case is concretely:
default:
    DUK_UNREACHABLE():
    goto skip_fastint;

Because DUK_UNREACHABLE() compiles to __builtin_unreachable(), the compiler is justified in not making that code path work. Interestingly it only affects -O2 - but that's par for the course for this kind of bugs.
Removing the DUK_UNREACHABLE() fixes the issue.

Running the test set manually nothing else fails with gcc 4.8.4 -O2 after this fix.

This was my bad, I saw that the default case jumped to skip_fastint but somehow missed the DUK_UNREACHABLE() hint... :)

These are pretty hard to catch because they only manifest in only certain conditions (like compiler versions, register pressure, whatever). Here also if I added debug prints the problem went away because the debug prints affected register handling.
Realistically this could have been caught with an updater matrix compile test that would run testcases with different compiler versions, different compiler options, and different Duktape options. I had that tooling for the Duktape 1.x config model but not yet for the Duktape 2.x config. It also needs a bit more testing hardware, and I do have 4 dedicated physical hosts now for continuous testing.


Avoid creating cuser_cuser_* tables when extend AbstractCUser.

I created a custom User model based on your django-username-email AbstractCUser class. A side effect is the creation of cuser_cuser_* tables even though they are never populated. I’m wondering how to avoid creating these tables.
Here is the contents of my users/model.py:
from django.db import models
from django.contrib.auth.models import Group as BaseGroup
from cuser.models import AbstractCUser, CUserManager
class User(AbstractCUser):
    """
    Password and email are required. Other fields are optional.
    """
    class Meta(AbstractCUser.Meta):
        swappable = 'AUTH_USER_MODEL'

class UserManager(CUserManager):
    pass

class Group(BaseGroup):
    class Meta:
        proxy = True

@softweave Thanks for reporting this! It's fixed now.
@tmm Will you please do a PyPI release at your earliest convenience? Thank you!

Thanks @ataylor32 for fixing!
@softweave latest is on PyPi


Login page v2

Implement new design of login page: https://zpl.io/2j8jM8x

Task is completed and released.


Failed to fetch user's guild

Is this occurring cause if rate limits or something?
seems to happen randomly.

This happens when you hit the rate limit supposedly, but to reproduce:

Go to oauth login page
Double click on "Authorize"
Find error

I don't know what causes this, but I will try to look into it.

Thanks....please do

I'm having the same problem if someone can tell me some way around the multiple clicks on the Authorize button.

After several hours thinking of various solutions to avoid this error I came to this code:
const express = require("express");
const app = express();

const passport = require("passport");
const DiscordStrategy = require("passport-discord").Strategy;

const Strategy = new DiscordStrategy({
    clientID: "", // your client id here
    clientSecret: "", // your client secret here
    callbackURL: "", // your callback url here
    scope: ["guilds"] // your scopes here
}, async (accessToken, refreshToken, profile, cb) => {
    await process.nextTick(async () => {
        if (profile.guilds == undefined) return cb(null, false); // When there is an error fetching the user's guilds, the .guilds property returns undefined, so we must point out in the callback that all the information hasn't arrived with cb(null, false)

        return cb(null, profile);
    });
});

passport.use(Strategy);
passport.serializeUser((user, done) => {
    if (!user) return; // In serialization, if the value received is false, as we saw above, it means that the information did not arrive in its entirety, that is, it is a repeated request and therefore it did not get all the information, so we must return to avoid serialization errors
    return done(null, user);
});
passport.deserializeUser((obj, done) => done(null, obj));

app
// Put whatever you are using in your application
.use(passport.initialize())
.use(passport.session())
.get("/callback", function (req, res, next) { return passport.authenticate("discord", { failureRedirect: "/" }, async function (err, user, info) {
    if (err) {
        console.error(err); // In case of an error, it must always be registered the choice is yours
        return res.redirect('/');  // This part is very important, even if it gives an error, unless it is a 429 (rate limit), the client will have all the information requested from the user, so here you must put the url you want it to be sent to (you can use the req.session.backURL, for example)
    }

    await req.login(user, function (e) {
        if (e) return next(e); // As we are careful with user serialization here it will not return anything so this part is not really necessary
        return next();
    });
})(req, res, next); }, async function (req, res) {
    return res.redirect('/'); // Then we must redirect the user to wherever you want
})

IMPORTANT

I've been looking for the answer for a few days and I've come to this conclusion if you have any better conclusions, please reply to this message.
If something was not clear I apologize, and sorry also for my English I used google translator a lot.

What we should do is see if this happens on any scope, or just the guilds scope.
I don't have time to look into this myself, but I know how to reproduce this, but I am unsure if this is a library bug or a Discord bug (and I'm leaning towards both).

HEY! Sorry for the late response, if you're getting this error it's most likely caused by the actual `
Strategy.prototype.checkScope
part, all you have to do is simply change the url in
this._oauth2.get('https://discord.com/api/users/@me' + scope, accessToken, function(err, body, res)
to
this._oauth2.get('https://discord.com/api/users/@me/' + scope, accessToken, function(err, body, res)
What it's trying to do is do a function to pull the guilds from the api in the wrong way and putting guilds right next to @me rather than making a slash
Hopefully this should help ❤


Is it no longer possible to derive a subclass from an Avalonia control in 11?

I have an app where I derive several custom controls from existing controls. A full complete (previously but now non-working) example is given below.
In fact, the Avalonia documentation gives an example of how to do precisely this:  https://docs.avaloniaui.net/docs/next/guides/custom-controls/add-custom-control-class
It has all worked and my app relies on it. However, since circa 11.0.3, it just stopped working. The behaviour is that the control is created as normal, but is just invisible.
Was there a secret breaking change? Or am I missing something here?
See also: https://github.com/AvaloniaUI/Avalonia/issues/12966
using System.Globalization;
using System.Text;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity;
using AvantGarde.Utility;

namespace AvantGarde.Views;

/// <summary>
/// A custom TextBox. By default, it has monospace font.
/// </summary>
public class CodeTextBox : TextBox
{
    public CodeTextBox()
    {
        FontFamily = "monospace";
        CornerRadius = new CornerRadius(0);
        TextWrapping = Avalonia.Media.TextWrapping.NoWrap;
        AcceptsReturn = true;

        GotFocus += GotFocusHandler;
        LostFocus += LostFocusHandler;
    }

    /// <summary>
    /// Gets or sets the tab character width. Used only for caret position calculation.
    /// </summary>
    public int TabWidth { get; set; } = 4;

    /// <summary>
    /// Gets the caret position as (line, col). If the box is empty, the result is (1, 1).
    /// </summary>
    public Tuple<int, int> GetCaretPos()
    {
        int line = 1;
        int col = 1;

        var text = Text;

        if (text != null)
        {
            int idx = CaretIndex;

            for (int n = 0; n < text.Length; ++n)
            {
                if (n == idx)
                {
                    break;
                }

                var c = text[n];

                if (c == '\n')
                {
                    line += 1;
                    col = 1;
                }
                else
                if (c == '\t')
                {
                    col += TabWidth;
                }
                else
                if (c >= ' ' && !Char.IsControl(c))
                {
                    col += 1;
                }
            }
        }

        return Tuple.Create(line, col);
    }

    /// <summary>
    /// Gets caret position as "Ln y, Row x".
    /// </summary>
    public string GetCaretLabel()
    {
        var c = GetCaretPos();
        var sb = new StringBuilder("Ln ");
        sb.Append(c.Item1);
        sb.Append(CultureInfo.CurrentCulture.TextInfo.ListSeparator);
        sb.Append(" Col ");
        sb.Append(c.Item2);

        return sb.ToString();
    }

    /// <summary>
    /// Sets the caret position based on column and line. It returns CaretIndex.
    /// </summary>
    public int SetCaretPos(int line, int col)
    {
        var text = Text;
        col = Math.Max(col, 1);

        if (col > 0 && text != null)
        {
            int x = 1;
            int y = 1;

            for (int n = 0; n < text.Length; ++n)
            {
                if ((y == line && x == col) || y > line)
                {
                    CaretIndex = n;
                    return n;
                }

                var c = text[n];

                if (c == '\n')
                {
                    y += 1;
                    x = 1;
                }
                else
                if (c == '\t')
                {
                    x += TabWidth;
                }
                else
                if (c >= ' ' && !char.IsControl(c))
                {
                    x += 1;
                }
            }

            // Set end
            CaretIndex = Math.Max(text.Length - 1, 0);
        }

        return CaretIndex;
    }

    protected override async void OnKeyDown(KeyEventArgs e)
    {
        if (e.KeyModifiers == KeyModifiers.Control)
        {
            var clippy = this.GetOwnerWindow().Clipboard;

            if (e.Key == Key.C)
            {
                if (clippy != null && !string.IsNullOrEmpty(SelectedText))
                {
                    await clippy.SetTextAsync(SelectedText);
                }
            }
            else
            if (e.Key == Key.A)
            {
                SelectAll();
            }
        }
    }

    private void GotFocusHandler(object? sender, GotFocusEventArgs e)
    {
    }

    private void LostFocusHandler(object? sender, RoutedEventArgs e)
    {
    }

}

there shouldn't be any breaking change between 11.0.0 and 11.0.4. So if it worked in 11.0.0, please file a minimal sample for us to reproduce. If you are comming from 0.10, that's a different story.

Yeah, I think I've got confused between the versions (sorry). I can confirm it's broken in 11.0.0, as just tried it.
I'll come back to you with a minimal sample. In the meantime, some screen shots:

check original control themes if you try to override them. We renamed some template parts. So if these are missing in your style, the template cannot be applied and control will fail.

You're missing the StyleKey override. https://docs.avaloniaui.net/docs/next/stay-up-to-date/upgrade-from-0.10#optional-but-recommended
If you don't override the StyleKey it looks for a custom control template, which if all you're doing is functionality changes rather than appearance you probably haven't made.  Add the following:
protected override Type StyleKeyOverride => typeof(TextBox);

and it should reappear looking like any other TextBox.

Your CodeTextBox wouldn't work in 0.10 either. I assume you have removed stylekey override during migration, while it should be kept there, just changed to new StyleKeyOverride property. See the migration guide (linked in the message above).

Your CodeTextBox wouldn't work in 0.10 either. I assume you have removed stylekey override during migration, while it should be kept there, just changed to new StyleKeyOverride property. See the migration guide (linked in the message above).

Correct. It actually inherited from IStyleable and did implement the interface. It was indeed removed during migration. Thank you for you help. Still a problem with https://github.com/AvaloniaUI/Avalonia/issues/12966 though.

You're missing the StyleKey override. https://docs.avaloniaui.net/docs/next/stay-up-to-date/upgrade-from-0.10#optional-but-recommended
If you don't override the StyleKey it looks for a custom control template, which if all you're doing is functionality changes rather than appearance you probably haven't made. Add the following:
protected override Type StyleKeyOverride => typeof(TextBox);

and it should reappear looking like any other TextBox.

Thank you.


urllib.parse error

Hi. I am trying to install appmon following the guides in github and searching around but i allways get this message:

Traceback (most recent call last):
File "appmon.py", line 22, in
import database as db
File "/home/mf/Tools/appmon/appmon/database/init.py", line 18, in
import dataset, json, time
File "/home/mf/Tools/appmon/local/lib/python2.7/site-packages/dataset/init.py", line 3, in
from dataset.database import Database
File "/home/mf/Tools/appmon/local/lib/python2.7/site-packages/dataset/database.py", line 3, in
from urllib.parse import parse_qs, urlparse
ImportError: No module named parse

I am installing it in a fresh kali machine.

Solved the problem installing dataset==1.1.2


acpi_tables: Fix VIOT endpoint_id remapping

Summary of the PR
For non-zero segment remappings defined in ACPI VIOT data structures it's very likely that target endpoint namespace will start at 0, without requester segment number encoded in the translation request.
This change updates default VIOT endpoint_id generation - starting point of the translated identifiers, to ignore requester segment number.

@rbradford CI is failing on clippy, is that something you want to fix or should we merge anyway?

It's only failing on beta - we can fix this in a separate PR.


Unreachable top screen in maximized window

Does this issue occur when all extensions are disabled?: Yes/No

VS Code Version: 1.56.2
OS Version:  Windows 10 20H2

Steps to Reproduce:
Hard to know. It often happens to me after few days having my computer on. It also happens in Whatsapp for some reason. I closed and relaunch VSCode, but the bug is still here. If I click in the black top area, it clicks on the windows underneath. For example, if I have only the VSCode window open, it will click on my desktop and display it. My only way to display the top part is to use the windows+arrow down shortcut, and have a floating window.
Here are the screenshots:
Maximized VSCode window:

Floating VSCode window:

I found the issue, it seems like it's Windows-related. Killing the process called "dwm.exe" made everything go back to normal. Sorry for open an issue here !
I hope it will help other people in the future anyways :)


deno Installed Instead of tea

I am hoping the provided package is supposed to install tea cli but instead deno is being installed. Steps to reproduce:
brew install teaxyz/pkgs/tea-cli
tea --help

Hm. In the past, we've seen issues where compiling deno has not passed the flags through to the compiled binary. Can you brew info tea-cli (I believe) for the version? What platform and architecture as well?

[king-11@DESKTOP-CG3RLCD]~% brew info tea-cli
==> teaxyz/pkgs/tea-cli: stable 0.39.4 (bottled)
Unified package manager
https://tea.xyz
Conflicts with:
  tea (because both install `tea` binaries)
Not installed
From: https://github.com/teaxyz/homebrew-pkgs/blob/HEAD/tea-cli.rb
License: Apache-2.0
==> Dependencies
Build: deno ✘
==> Caveats
try it out:

    tea node@18 -e 'console.log("brewing up some tea")'

tea’s shell magic is its secret sauce †

    tea --magic=install

> † https://docs.tea.xyz/features/magic

OS: Fedora 38
Architecture: x86_64

Ok, I've confirmed the release binaries, and the bottle binaries are correct. I believe linuxbrew might be stripping the binaries at install time, which we've seen mangles compiled deno programs in the past. It should be an easy fix, just need to dig out that syntax for the brew recipe.
[root@b1e42deff5ba /]# ls -l tea /home/linuxbrew/.linuxbrew/Cellar/tea-cli/0.39.4/bin/tea tea-cli/0.39.4/bin/tea
-rwxr-xr-x 1 root root 103685784 Jul 31 14:42 /home/linuxbrew/.linuxbrew/Cellar/tea-cli/0.39.4/bin/tea
-rwxrwxrwx 1 1001<PHONE_NUMBER>27 Jul 29 15:25 tea  # teaxyz/cli release
-rwxr-xr-x 1 1001<PHONE_NUMBER>27 Jul 29 15:25 tea-cli/0.39.4/bin/tea  # teaxyz/homebrew-pkgs release

It seems to be a species of this bug: https://github.com/teaxyz/brewkit/blob/main/share/brewkit/fix-elf.ts#L38-L42
Linuxbrew doesn't allow skip_relocation tagging. We're exploring some options; this problem is likely to be encountered by other compiled deno packages.

Ok, 8b3761f7dbbdbcb2d94dd7fcd7bdb8e963189e0c should "fix" the issue, by not publishing bottles for linux until we can resolve the patchelf issues with deno-compiled programs. TMI, I'm sure.
What this means for the future, is that tea-cli should build on linux systems, which, I just tested on fedora38, works fine at this time.
To fix your install @king-11 , you should be able to do brew reinstall --build-from-source tea-cli and you'll be up and running. Thanks for the bug report! And sorry to any linuxbrew users who were caught out by this.

[root@b1e42deff5ba Homebrew]# brew install teaxyz/pkgs/tea-cli
Running `brew update --auto-update`...
==> Tapping teaxyz/pkgs
Cloning into '/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/teaxyz/homebrew-pkgs'...
remote: Enumerating objects: 270, done.
remote: Counting objects: 100% (89/89), done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 270 (delta 51), reused 82 (delta 47), pack-reused 181
Receiving objects: 100% (270/270), 45.37 KiB | 1.97 MiB/s, done.
Resolving deltas: 100% (152/152), done.
Tapped 1 formula (20 files, 153.8KB).
==> Fetching teaxyz/pkgs/tea-cli
==> Downloading https://github.com/teaxyz/cli/releases/download/v0.39.4/tea-0.39.4.tar.xz
Already downloaded: /root/.cache/Homebrew/downloads/9567ad60bb70087d1969c3f68db7a97b25e0566a8ea502447acd7ec7f3e52342--tea-0.39.4.tar.xz
==> Installing tea-cli from teaxyz/pkgs
==> deno task compile
==> Caveats
try it out:

    tea node@18 -e 'console.log("brewing up some tea")'

tea’s shell magic is its secret sauce †

    tea --magic=install

> † https://docs.tea.xyz/features/magic
==> Summary
🍺  /home/linuxbrew/.linuxbrew/Cellar/tea-cli/0.39.4: 5 files, 98.8MB, built in 27 seconds
==> Running `brew cleanup tea-cli`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
[root@b1e42deff5ba Homebrew]# tea --help
usage:
  tea [-SEn] [+package~x.y…] [cmd|file|URL] [--] [arg…]

examples:
  $ tea node^19 --eval 'console.log("tea.xyz")'
  $ tea +nodejs.org man node
  $ tea +bun.sh sh
  # ^^ try out bun in a containerized shell

flags:
  --sync,-S       sync and update environment packages
  --env,-E        inject local environment
  --dry-run,-n    don’t do anything, just print

more:
  $ tea --verbose --help
  $ open https://docs.tea.xyz

Thanks a lot @jhheider this is working now thanks a lot for quick resolution


Some error about MGP-STR

When I try to run demo.py, I meet this error:
OSError: Can't load tokenizer for 'gpt2'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'gpt2' is the correct path to a directory containing all relevant files for a GPT2Tokenizer tokenizer.

Please refer to this issue:issue59


how to contact you in slack

I have downloaded slack, but i found that it's hard to join your group, especially i need a workspace url ，Is there any guide for us to join the slack workspace to contact you for some more details?
Or can we contact  in wechat group talk?

@zhanghb97 Have any idea?

There is a invite link on our website, you may try this. It is at the bottom of page, so it's pretty easy to ignore it 😂.
If it doesn't work, please at me or zhanghb97.


Problem: Blind Polling until the date matches an expression

Currently we blindly increase the time by one second in a loop. Then we check every job against the current date.
It could be more reasonable to calculate the next run date on every job and sleep until then. This could be achieved using Crontab.Scheduler.get_next_run_dates
I think this would make the code a lot more understandable.

Duplicate of #4, but would be happy to see this implemented!

Great, I will do after #152

This should be able to use Process.send_after with the :abs option

Solved with #230


2 questions about this software (in conjunction with grafana-rrd-datasource)

Does this support reading from rrdcached instead of local rrd files?

What are the benefits of the grafana plugin using this HTTP wrapper vs the grafana plugin directly accessing a local copy of rrdtool?

I'm personally new to Grafana, and I'm looking for options to upgrade my graphing UI from home rolled javascript over rrdgraph output to something with more horsepower. But I feel like Grafana won't make much sense for us unless I can vet a reliable path to the datastore. 😅
I hope this query finds you well and I look forward to hearing your perspective on the matter. ✌

1.) Not sure/can't remember.
2.) At the time it was so I could have a single server with grafana but get metrics from multiple rrd files across multiple servers.


Typo in code sample

Isn't this 'invocationContext' supposed to be called 'rhiContext'?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: a109e339-bce8-9580-12f8-dab879a3dcfc
Version Independent ID: a109e339-bce8-9580-12f8-dab879a3dcfc
Content: Filters in Minimal API applications
Content Source: aspnetcore/fundamentals/minimal-apis/min-api-filters.md
Product: aspnet-core
Technology: aspnetcore-fundamentals
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

Here's a direct link to the line in question: https://github.com/dotnet/AspNetCore.Docs/blob/c963eefaf7c12890b7bd911abd3874c0bfd693cb/aspnetcore/fundamentals/minimal-apis/min-api-filters/7samples/Filters/Program.cs#L12

@codemonkey85  nice catch. Fixed in #26264

@codemonkey85  see this suggestion


Laboratory work #1, Ratmir Akhmatzyanov - 22FPL1

Nothing to review. Any way I hope you will done in time.

Very sad again :(

So sad... Nothing to review again


toksearch attempting to fetch_dims of a scalar signal

Error raised when fetching scalar signals in toksearch. Bug encountered by @Pranav-Sureshp
from toksearch import MdsSignal, Pipeline
shots = [170325]
volts_sig  = MdsSignal(r'\NB15L:NBVAC_SCALAR','NB',location="remote://atlas.gat.com")
pipeline = Pipeline(shots)
pipeline.fetch('volts', volts_sig)
records = pipeline.compute_serial()
print(vars(records))
#########################################################
#MDS code that works for the identical shot and signal
from MDSplus import *
c = Connection('atlas.gat.com')
c.openTree('NB',170325)
volts = c.get('NB15L:NBVAC_SCALAR').data()
print(volts)
Error Raised:
'Traceback (most recent call last):\n  File "toksearch/pipeline/pipeline_funcs.py", line 23, in toksearch.pipeline.pipeline_funcs._SafeFetch.__call__\n  File "toksearch/signal/signal.py", line 145, in toksearch.signal.signal.Signal.fetch\n  File "toksearch/datasource/mds_datasource.py", line 205, in toksearch.datasource.mds_datasource.MdsRemoteDataSource.fetch\n  File "toksearch/datasource/mds_datasource.py", line 215, in toksearch.datasource.mds_datasource.MdsRemoteDataSource._fetch_dim\n  File "/opt/toksearch/deps/mdsplus/mdsobjects/MDSplus/connection.py", line 245, in get\n    ans = self.__getAnswer__()\n  File "/opt/toksearch/deps/mdsplus/mdsobjects/MDSplus/connection.py", line 132, in __getAnswer__\n    raise MdsIpException(str(ans))\nMDSplus.connection.MdsIpException: %MDSPLUS-?-UNKNOWN, %TDI-E-INVCLADSC, Storage class not valid, must be scalar or array\n'
Most likely culprit:
Use of "dim_of()" on a scalar MdsPlus signal somewhere around:
toksearch/toksearch/signal/mds.py
Line 398: https://github.com/GA-FDP/toksearch/blob/main/toksearch/signal/mds.py#L398
or
https://github.com/GA-FDP/toksearch/blob/main/toksearch/signal/mds.py#L399
suggestion:
check rank of signal before calling dims_of(,)
def _rank_of_expression(expression):
return "rank({})".format(expression)
rank_expression = _rank_of_expression(expression)
rank = connection.get(dim_expression)
if rank > 0:
....
or use getnci(expression) and check the type is numeric

As suggested by @orozda , replace the expression
volts_sig  = MdsSignal(r'\NB15L:NBVAC_SCALAR','NB',location="remote://atlas.gat.com")  with an additional argument for dims as None, fixes the problem , as follows:
volts_sig  = MdsSignal(r'\NB15L:NBVAC_SCALAR','NB',location="remote://atlas.gat.com",dims=None)
Output:
volts: 	data: 80259.1796875  	units: {'data': 'V'}


Fix static MAC address setting and add support for copying parent VHD…

… to remote Hyper-V server.

Will merge as part of Zsolt commit, to not break that commit.


Journey does not send last email

I have a journey that

has an entrance based on the user_created event
sends a first email
delays for a minute
sends a 2nd email
sends a 3rd email (without delay)

Emails no. 1 and 2 are sent fine. Email no. 3 is not sent. I expected it to be sent right after email no. 2.
Detail: Email no. 3 is called "Added later" because I ran a previous test where it wasn't there at first. I wanted to know what happens when I add another email later while the users are already on the journey. Nothing happened.
But even when I subscribe a totally new user to the same journey, email no. 3 is not sent to them! Why?
Here is a screenshot of the journey details:

@mattes3 I was having a hard time reproducing this one on my end / getting to the bottom of it and am still unsure if I've identified the problem you are having.
The first situation you described is normal, once a user completes a journey, adding a new step to that journey wont re-enter them into it. That would cause all sorts of nightmares if you ever wanted to modify a journey.
The second situation is not normal. Based on the code itself, there is nothing that would prohibit back to back sending, it should just work. After trying like 50 different times to reproduce I finally had it happen a couple of times, in every case it was the email sender blocking the send with an error like the following: 421-4.3.0 Temporary System Problem.. This led me down the path of error handling and we aren't appropriately closing the journey loop when a campaign fails to send. This will be addressed in the next version (#434).
Unsure if that is the problem you are experiencing, but was unable to replicate under any circumstances except a sending failure. If you could check under the user in question to see if there is a 'email_failed` event that would be super helpful. If it's still happening, if you have any additional details that could help in debugging please send them over!

Thanks, @pushchris, for taking care of this. Yes, indeed, it is possible that Amazon SES threw an error because the two emails were right after one another. I now configured the AWS SES integration to send a max. of 12 emails per second, as SES allows me to send 14 per second (let's be on the safe side here).
I will now update to the latest version and try a journey with a bunch of 50 users, to see if this works.

OMG, I finally discovered the true reason why this happened: My last email had no "from" address so it failed to send. Sorry to have bothered you with this, Chris!

It's all good, we found an edge case along the way so time well spent. The fact that you weren't able to identify that as the cause early enough is probably also problematic, we'll need to find some ways to highlight that the campaign wasn't valid. When doing a normal blast campaign this check happens when you try to send it, for journeys because there is no "launching" or a campaign we don't currently run that step.

I've added some improvements to the UI surrounding campaign templates to hopefully make it more clear when these issues come up. There is a validation step inside of an email send that will preemptively fail it if it doesn't pass parameter validation and log the exact parameter at fault into the email_failed event. The template design screen also has warning tags on any fields that are missing a parameter


[Fix]: After page refresh back button opensSave the world page with chat LHN instead of menu list

Details

Fixed Issues

$ https://github.com/Expensify/App/issues/40084
$ https://github.com/Expensify/App/issues/36649
PROPOSAL:
Tests

[x] Verify that no errors appear in the JS console

Offline tests

QA Steps

Go to staging.new.expensify.com
Go to Profile > Save the world > I know a teacher.
With RHP open, refresh the page.
Dismiss the RHP.
Click browser back button.

App will open previously visiting settings page

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

MacOS: Chrome / Safari
https://github.com/Expensify/App/assets/156438377/c3263efe-fde2-4c44-b4a5-33481f2fc42d

MacOS: Desktop

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

This is mostly working great for me. My one note is that I have to click the back button twice to navigate to my previous settings page. Is that expected?
https://github.com/Expensify/App/assets/7516624/4ae1acf0-8919-42bf-9cb4-acd9c1e4a868

This is mostly working great for me. My one note is that I have to click the back button twice to navigate to my previous settings page. Is that expected?
CleanShot.2024-04-11.at.09.32.44-converted.mp4

Oh interesting, it seems something's up with the navigation history with the RHP @Amarparab2024 @Ollyws, do you know what could be a possible solution for this?

Ok cool, thank you guys! @Amarparab2024 can you resolve the conflicts?

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by https://github.com/marcochavezf in version: 1.4.63-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/mountiny in version: 1.4.63-21 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Add helpful link to pre-commit logs

As a pull request owner and reviewers, I checked that:

[x] Appropriate testing is done and actually running

/hold https://github.com/openstack-k8s-operators/ci-framework/pull/1570 needs to merge first

There's a better way, embedded in Zuul itself, with the "artifacts". Though I don't remember how to leverage this.


Clean up stopping

Hi team. Thanks for all your reviews and letting me contribute to this project. Hope you're both staying safe and healthy.
Here's a PR that cleans up stopping in ScreencastFrameCollector.

No more fixed 1s wait for frames to arrive - instead we mark when stop() is called and wait for frame timestamps to surpass that timestamp
No more extra frames stuffed at the end of the recording - the video capture will stop as soon as stop() is called

Note: I had to add back 1s as a max because it appears there are times the screencast API doesn't emit frames all the way up to the stopped timestamp.

Thanks so much for the review @flaurida!


Required body text in link blob

Right now the half-width link blob requires content between the heading and list of links. That's not working for /college-credit-card-agreements-browse/ - do we need to create lead-in text or can this be changed to not required (in Wagtail and on wiki)?

Where is that page. I don't see it on the top level.

Found it and the issue.

BEWDs will have to make that field unrequired.

Fixed in refresh!


A domain name

But what should it be called?

If we do host on azure https://docs.microsoft.com/en-us/azure/app-service/manage-custom-dns-buy-domain
Need to price it


Dynamic data sources

Resolves #719 (or rather, makes the graph-node changes needed for it).
Goes along with the following two PRs for graph-ts and graph-cli:

https://github.com/graphprotocol/graph-ts/pull/44
https://github.com/graphprotocol/graph-cli/pull/234

Defining a dynamic data source
Dynamic data sources are defined as templates in the manifest:
# ...
dataSources:
  - kind: ethereum/contract
    name: Factory
    # ...
    templates:
      - name: Exchange
        kind: ethereum/contract
        network: mainnet
        source:
          abi: Exchange
        mapping:
          kind: ethereum/events
          apiVersion: 0.0.1
          language: wasm/assemblyscript
          file: ./src/mappings/exchange.ts
          entities:
            - Exchange
            - Transaction
            - User
            - UserExchangeBalance
          abis:
            - name: Exchange
              file: ./abis/exchange.json
          eventHandlers:
            - event: TokenPurchase(address,uint256,uint256)
              handler: handleTokenPurchase
            - event: EthPurchase(address,uint256,uint256)
              handler: handleEthPurchase
            - event: AddLiquidity(address,uint256,uint256)
              handler: handleAddLiquidity
            - event: RemoveLiquidity(address,uint256,uint256)
              handler: handleRemoveLiquidity

Creating a dynamic data source
Dynamic data sources are imported from the generated code and used as follows:
import { Exchange as ExchangeTemplate } from "../../generated/Factory/templates"

...

// Start indexing the exchange
ExchangeTemplate.create(event.params.exchange)

How dynamic data sources are implemented

When starting a subgraph, the node now not only loads the manifest, it also loads the dynamic data sources from the store and fetches their files from IPFS. It then injects the data source instances into the subgraph instance before starting the indexing.

Whenever we we process a block and mappings request new data sources, these data sources are collected and, after having processed the block, are instantiated from templates. We then process the current block again but only with those new data sources. The entity operations from this are merged into the ones we already have for the block. After that, the dynamic data sources are persisted by adding the data sources to the subgraph instance and by adding entity operations to store them in the db (for 1.).

If new data sources have been added in a block, the block stream is restarted to incorporate events that are relevant for the new data sources going forward. We figured this would be easier to do (and it is) than modifying the block stream while it is already running.

The dynamic data sources in the database can be queried through the "subgraph of subgraphs":
{
  subgraphDeployments {
    manifest {
      dataSources { ... }
    }
    dynamicDataSources {
      ...
    }
  }
}

Todos

[x] Store block hash and block number of when a dynamic data source was created
[x] Add an environment variable to limit the number of dynamic data sources per subgraph. Pick a reasonable default.
[x] Fix the test suite
[x] Add unit tests for dataSource.create host export
[ ] Add other tests

@graphprotocol/developers Due to the number of commits and changes here, I'd almost recommend going through commit by commit. I've spent a few hours structuring these so they kinda tell a story and should be easy to follow.

Not yet, but fixing the test suite is the next thing on my list.

@leodasvacas I think I've addressed all your comments.

Don't know what's up with Travis, but that test is known to not be reliable (see #803).

@Jannis we can #[ignore] that test for now.

@Jannis you need to fix the test suite.

Nooooo, not again! Sure, will do that in the morning.

@lutter All green now 🎉


Add TypeScript paths for exports

If the TypeScript client with moduleResolution is different then Node16/NodeNext in tsconfig.json tries to do the following import:
import { GenAIModel } from '@ibm-generative-ai/node-sdk/langchain'

The following error occurs "Module not found" even if the client can handle the sub-directory import (Node 12+).
This can be solved by adding typesVersions field to the package.json.

Released in 1.2.0


[9.x] Improve arithmetic operation in eachById()

There is no need to calculate paging offsets in every loop.

If the code is not broken I don't see a huge benefit in changing it.

If the code is not broken I don't see a huge benefit in changing it.

Okay, It's just a matter of programming philosophy.
As you said, this change is negligible on modern computers.
BTW.
In my opinion, since we regard Laravel as an Web Artisan, so we should accept some better coding style, isn't it?


fix: fix rekor verification

Signed-off-by: Asra Ali<EMAIL_ADDRESS>This fixes rekor verification by:

Removes support for v0.0.2 builders and v1.0.0 builders. At v1.1.1 and all other major versions, we support embedding the cert in the DSSE envelope, which allows us to make verifiable Rekor lookups rather than rely on a key-value index store.
Consolidate logic in VerifyProvenanceSignature: verifies the provenance in a step-by-step manner: covering signature validation, rekor lookup, and signature time validation (against entry upload time)
Removes dead code that was needed for the key-value index store lookups.
Adds testing for retrieving a rekor entry.
Uses Rekor's libraries for verifying a TLOG entry to avoid issues with Rekor API changes.

This change will need backporting to all major releases! TODO tomorrow.

Thank you! I realized in doing the backported fixes that I can make a much less invasive change because that helped me pinpoint the exact issue; I will make the full fixes here (relying on rekor libraries) after the backports just FYI


Black Record file

Hi all,
I just implemented Viseron on my system. I use casaOS for the hostOS (Debian 12).
I have 5 cameras configured but all records files are completely black.
Config:
ffmpeg:
  camera:
    camera_1:
        name: camera_1
        host: HostIP
        port: 554
        path: /Preview_01_main
        fps: 20
        username: username
        password: password
        substream:
            port: 554
            path: /Preview_01_sub
            fps: 10

    camera_2:
        name: camera_2
        host: HostIP
        port: 554
        path: /Preview_01_main
        fps: 20
        username: username
        password: password
        substream:
            port: 554
            path: /Preview_01_sub
            fps: 10

    camera_3:
        name: camera_3
        host: HostIP
        port: 554
        path: /Preview_01_main
        fps: 20
        username: username
        password: password
        substream:
            port: 554
            path: /Preview_01_sub
            fps: 10

    camera_4:
        name: camera_4
        host: HostIP
        port: 554
        path: /Preview_01_main
        fps: 20
        username: username
        password: password
        substream:
            port: 554
            path: /Preview_01_sub
            fps: 10

    camera_5:
        name: camera_5
        host: HostIP
        port: 554
        path: /Preview_01_main
        fps: 20
        username: username
        password: password
        substream:
            port: 554
            path: /Preview_01_sub
            fps: 10

mog2:
  motion_detector:
    cameras:
      camera_1:  # Attach detector to the configured camera_2 above
        fps: 10
        trigger_recorder: true
      camera_2:  # Attach detector to the configured camera_2 above
        fps: 10
        trigger_recorder: true
      camera_3:  # Attach detector to the configured camera_2 above
        fps: 10
        trigger_recorder: true
      camera_4:  # Attach detector to the configured camera_2 above
        fps: 10
        trigger_recorder: true
      camera_5:  # Attach detector to the configured camera_2 above
        fps: 10
        trigger_recorder: true

nvr:
  camera_1:  # Run NVR for camera_1
  camera_2:  # Run NVR for camera_2
  camera_3:  # Run NVR for camera_1
  camera_4:  # Run NVR for camera_2
  camera_5:  # Run NVR for camera_1

The live view is ok, I can see the correct camera immage

Do you get any errors in the browser console?
If not, could you play the video in VLC for instance and check the Media Information/Codec Information?

Thanks a lot for the answer. If I download the file and check it with VLC, I can see the record section.
From VLC I can see:

Sorry, i change the language on VLC in EN to re-share the codec information:

Thanks!
And no errors in the browser console?

only this https://github.com/roflcoopter/viseron/issues/832#issuecomment-2467955028

I meant in the browser devtools console, in chrome you can open it with F12

If it's possible to change your cameras encoding to h264 instead of hevc, please try if that works

unlike i cannot do it:
https://community.reolink.com/topic/2961/codec-rlc-810a
Reolink cameras mainstream is only h265 and I cannot be changed

Ahh i see, can you run a quick test with the substream instead then?
If it still produces black video we can rule out the encoding.

with the substream, the file is visible from the web interface. but is in 640p

sorry, it is just an issue with the browser, with google chrome last version (compatible with V9 video stream) is working as expected


Copy Opcode Action

Binary Ninja Version: 3.6.4819-dev
OS: macOS
OS Version: 14.1
CPU Architecture: arm64

What is the feature you'd like to have?
Any way to copy an instruction opcode out of linearview.
Additional Information:
This is useful when writing an arch plugin.

In the hamburger menu in the top right of the pane, there is a Show Opcode Bytes option that shows the opcode bytes right in Linear View. These are selectable/copyable.
Were you aware of this option? And is this worse for your workflow in some way than having an action?
Here's how it looks for a random ARM ELF I had open:

At the time of filing I was unable to copy the bytes when selected. IIRC there was not even a ⌘C option in the menu. This may have been a focus issue that is no longer present. Cannot repro so I will close.


Feature/op 18768 gate v4.1

We prefer small, well tested pull requests.
Please refer to Contributing to Spinnaker.
When filling out a pull request, please consider the following:

Follow the commit message conventions found here.
Provide a descriptive summary for your changes.
If it fixes a bug or resolves a feature request, be sure to link to that issue.
Add inline code comments to changes that might not be obvious.
Squash your commits as you keep adding changes.
Add a comment to @spinnaker/reviewers for review if your issue has been outstanding for more than 3 days.

Note that we are unlikely to accept pull requests that add features without prior discussion. The best way to propose a feature is to open an issue first and discuss your ideas there before implementing them.

This PR successfully triggered this build https://jenkins.opsmx.net:8181/jenkins/job/Dev-gate-forargo/14/

This PR successfully triggered this build https://jenkins.opsmx.net:8181/jenkins/job/Dev-gate-forargo/15/

This PR successfully triggered this build https://jenkins.opsmx.net:8181/jenkins/job/Dev-gate-forargo/18/


Improve Java module names

Improve Java module names by pre-pending com.almasb. to all modules declared by FXGL.
Samples and 3rd-party applications that make use of FXGL module names need to be updated.
Closes #621

Codecov Report

Merging #622 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #622   +/-   ##
=========================================
  Coverage     48.06%   48.06%
  Complexity     1494     1494
=========================================
  Files           166      166
  Lines          8664     8664
  Branches        812      812
=========================================
  Hits           4164     4164
  Misses         4294     4294
  Partials        206      206

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e7b5bd5...ccac79a. Read the comment docs.


Reduce variables and critical markup

Although we can infer a lot about a multi-threaded application from APIs like OpenMP at runtime, they don't quite provide enough information.
This PR introduces a few explicit host interface calls that tell Faasm which variables are reduce variables, and where to acquire and release local locks. It's possible that we can perform either a preprocessing step, or worst case modify OpenMP, to insert these calls at compile time, and simplify the inference at runtime.
For now we will just inline the calls to check this can work, and the preprocessing step or modifying upstream toolchains can come later.
I've also removed a few unused/ unsupported OpenMP functions that were clogging things up.

I think the examples and experiments are probably sufficient documentation. Anything in markdown would rot fairly quickly as it's all changing quite fast.


Add interactive stack next (proposal)

Proposal
A stack next command that supports interactively selecting the path you want to navigate through.
For example if you have multiple stacks on top of your trunk (like below) and you run av stack next

It will now prompt you to ask which one you want to use:

This is a proposal and uses the github.com/erikgeiser/promptkit library, if this is accepted and you have a preferred prompt library let me know.

Have you tried av stack switch? It provides an interactive branch selection.

Have you tried av stack switch? It provides an interactive branch selection.

@draftcode Thanks for the tip, switch is great. But, sometimes I find it easier to navigate relative from where I am with next and prev, however currently next feels very broken when a stack consists of forks.
Is the plan to eventually deprecate next and prev in favour of switch?
Additionally, I would appreciate your thoughts on the suggestions in https://github.com/aviator-co/av/discussions/302 if you get a moment :)

Have you tried av stack switch? It provides an interactive branch selection.

@draftcode Thanks for the tip, switch is great. But, sometimes I find it easier to navigate relative from where I am with next and prev, however currently next feels very broken when a stack consists of forks.
Is the plan to eventually deprecate next and prev in favour of switch?

OK. We don't have a plan to deprecate these commands. Anyway, can you follow the same pattern as av stack switch impl for using bubbletea? I think promptkit is based on bubbletea and can be used as a widget of that.

Additionally, I would appreciate your thoughts on the suggestions in #302 if you get a moment :)

I'll take a look.

Anyway, can you follow the same pattern as av stack switch impl for using bubbletea? I think promptkit is based on bubbletea and can be used as a widget of that.

Will do this soon

@draftcode I've refactored this to use the bubbletea model structure :)


Uncaught TypeError: Cannot read property 'realPath' of undefined

[Enter steps to reproduce below:]

Install nuclide IDE
Try to change the project

Atom Version: 1.6.2
System: Mac OS X 10.11.4
Thrown From: project-viewer package, v0.2.31
Stack Trace
Uncaught TypeError: Cannot read property 'realPath' of undefined
At /Users/egor/.atom/packages/project-viewer/lib/views/project-view.js:158

TypeError: Cannot read property 'realPath' of undefined
    at project-view.clickProject (/Users/egor/.atom/packages/project-viewer/lib/views/project-view.js:158:59)

Commands
     -7:57.4.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-always.seti-ui-no-icons.theme-gruvbox.theme-nucleus-dark-ui)
     -7:29.9.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:06.8.0 nuclide-side-bar:toggle (div.package-detail.panels-item)

Config
{
  "core": {
    "customFileTypes": {
      "source.ini": [
        ".buckconfig",
        ".flowconfig"
      ],
      "source.json": [
        ".arcconfig"
      ],
      "source.python": [
        "BUCK"
      ]
    },
    "disabledPackages": [
      "linter-rust",
      "bookmarks",
      "language-c",
      "language-clojure",
      "language-coffee-script",
      "language-csharp",
      "language-go",
      "language-mustache",
      "language-objective-c",
      "language-perl",
      "language-php",
      "language-python",
      "language-ruby",
      "language-ruby-on-rails",
      "language-shellscript",
      "language-toml",
      "metrics",
      "racer",
      "linter-tslint",
      "vim-mode",
      "autocomplete-elixir",
      "tokamak-terminal",
      "tokamak",
      "tree-view"
    ],
    "ignoredNames": [
      ".git",
      ".hg",
      ".DS_Store",
      ".idea",
      "node_modules"
    ],
    "openEmptyEditorOnStart": false,
    "themes": [
      "nucleus-dark-ui",
      "gruvbox"
    ]
  },
  "project-viewer": {
    "startUp": true
  }
}

Installed Packages
# User
atom-typescript, v8.8.0
autocomplete-paths, v1.0.2
editorconfig, v1.2.4
file-icons, v1.7.1
flow-ide, v1.0.6
gruvbox, v1.0.5
highlight-selected, v0.11.2
language-babel, v2.17.1
language-docker, v1.1.6
language-elixir, v0.12.3
language-hocon, v1.1.0
language-rust, v0.4.6
language-scala, v1.1.6
linter, v1.11.4
linter-eslint, v7.1.3
nucleus-dark-ui, v0.7.16
nuclide, v0.129.0
pigments, v0.26.0
project-viewer, v0.2.31
tool-bar, v0.4.0

# Dev
No dev packages

hey @Wadjetz,
thanks for reporting this!

Hey just downloaded this and can't do anything with this bug :)

hi @ericmuyser,
will fix as soon as possible. was hoping it was a one time deal. sorry

this is due to having tree-view disabled.

Hey @jccguimaraes!
Totally understand. Are you sure about that though? I think I have tree view enabled?
I updated and now clicking on the item highlights it, but does nothing. Ideas?

Cheers

Sometimes it doesn't highlight it either

Oh snap one of  my plugins is disabling tree-view and using a different one. I restarted, I re-enabled it then opened project viewer, and still no go.

so clicking the project wont open it right?
this has been fixed on the next major release. as it is is a bad hack i did :(
maybe a new release on the tree-view broke the hack.
working as fast as I can :(

Oh sorry, I think I didn't understand how this was switching projects. I thought since I was adding a project it asked for a path that it meant it would open it for me. But looking at the code it looks like I need to add it to the tree view first? Is that right? It seems to be working now..

I thought it would like open that folder in a new window... or switch to the window that had that folder open. I dont know if that's even possible though

What if Atom loses the projects I added to the tree view? I dont want to go and add 30 folders back to it lol ideas?

You add root paths in the project add/edit mode/modal. You don't need to add in the tree-view.
You will definitly not loose the paths if you remove it in the tree-view.
The hack is just for the state of the expansion/collapsing of sub-folders.
The configuration is stored in a file in the atom root path.
I advise to you keep a backup of that file because it can loose the content if some crash occurs. (working on the fix also).
PV opens projects in the same window, not a new.
I may not be understanding what's happening to you. Can you elaborate on it?
Thanks

Woah, it's suddenly working. It just wasn't opening anything when I clicked on it. Seem sall good now. Pretty sweet. Thanks @jccguimaraes !!

good to know! @ericmuyser. Hope you stick with PV 😃


Integration test: common physical science workload

https://github.com/dask/distributed/issues/6571
I believe this could be simplified to something like
import dask.array as da

a = da.random.random((1000, 900, 800), chunks=100)
b = da.random.random((1000, 900, 800), chunks=100)
x = da.random.random((900, 800), chunks=100)
y = da.random.random((900, 800), chunks=100)

result = a[1:] * x + b[1:] * y
result.mean().compute()

This is basically the vorticity example from https://github.com/dask/distributed/issues/6560#issuecomment-1165215417. (Ideally downsized a bit, so it's faster and cheaper to run frequently.)
Add rechunks before the result operation for bonus complexity. (Note that the data and chunk sizes are just representative here and would need to be set to something larger than the cluster.)
This is expected to perform poorly right now (use a ton of memory, spill a ton to disk, and be really slow) because of:

https://github.com/dask/distributed/issues/6360
https://github.com/dask/distributed/issues/6570
https://github.com/dask/distributed/issues/6597

As we work on fixes to those above issues in the future, we should hopefully see performance improve.

I think I already did this in https://github.com/coiled/coiled-runtime/pull/243: https://github.com/coiled/coiled-runtime/blob/669a3d36eefec2c72af12dae08e2bee8db4a7de5/tests/benchmarks/test_array.py#L90-L133
I used the original vorticity example rather than the further-simplified one here, but I think they're equivalent in terms of the problems they exercise.
One big difference is that I did wait(arr_to_devnull(result)) instead of wait(result). In @TomNicholas's original workload, he wanted to write the array to zarr (I think right)? In my benchmarks in https://github.com/dask/distributed/issues/6560#issuecomment-1165215417, the "something else is going on here" thing that confused me was that in all cases, memory just went 📈, and ended at the same level in all cases.
I realized later that I was persisting the entire result, so dask had to keep all the output in memory, so of course it used a lot of memory. In #243 I instead simulated writing it to zarr, which theoretically should be able to work with a much-larger-than-memory array, but didn't due to all the problems listed.


Improve: binary ops with Number Protocol

Closes https://github.com/RustPython/RustPython/issues/4614
Based on https://github.com/RustPython/RustPython/pull/4139
Related to https://github.com/RustPython/RustPython/issues/3244
This PR will not pass some tests at this moment, since Number Protocol is missing for some types.
Let me create separate PRs to implement (part of) missing Number Protocols, and then rebase this PR once those are merged.

when rustpython crashes on initialization step, debugger is very useful
https://github.com/RustPython/RustPython/wiki/Debugger-with-VSCode

The next step is update_slot in slot.rs.
When operator is overriden from Python side, we have to set a function to the python function from rust side.

To support simple binary operators, looking for index_wrapper or len_wrapper will be useful. One wrapper matches to one slot.
To support self-mutating unary ops like __iadd__ and __add__, looking for richcompare_wrapper will be useful. When user defined __add__ on python side, both __add__ and __iadd__ slots have to be set.(1 python function to n slots) richcompare_wrapper is doing similar work - but the opposite way. (n python funciton to 1 slot)

your works seems based on #4139, right? By respecting the original contributor's work, I'd like to keep the original commit as part of this PR.

The following is the behavior in CPython
>>> class C:
...     def __add__(self, x):
...             return x + 100
...     def __radd__(self, x):
...             return x + 200
...
>>> c = C()
>>> c + 5
105
>>> 5 + c
205

I finally understand the trick. instead of number_binary_op_wrapper, adding number_binary_op_left_wrapper and number_binary_op_right_wrapper allows to share single PyNumber operation. And they can be separately overriden from python side. We need another PyNumberSlots struct.

@xiaozhiyan I made a rough sketch of the cpython way
https://github.com/RustPython/RustPython/commit/10c1929eb00953b04e53f33c7ffac600f0487225

the difference between my version and cpython is slot implementation.
I used different slot function for wrapper and number protocol implementation. But cpython use a single function for both cases
https://github.com/python/cpython/blob/6716254e71eeb4666fd6d1a13857832caad7b19f/Objects/typeobject.c#L7792-L7833

Because the patch is really huge, I’d like to suggest to split it down to multiple partial fixes.
Currently vm.binary_{i}op{1} with #[allow(dead_code)] seems to be a chunk.
Once finished, update_slot! stuff can be a chunk too. Even if it is not very correct at the moment, it will be fine unless we actually call them from vm._add etc
@qingshi163 how do you think?

I am bit confuse about the right_ops witch did not exist in cpython, why can't we just swap the direction as what we doing before?

I am bit confuse about the right_ops witch did not exist in cpython, why can't we just swap the direction as what we doing before?

As in the example https://github.com/RustPython/RustPython/pull/4615#issuecomment-1455131249 , left and binary ops and be defined separately. So we need to store them separately. Please check the latest commit https://github.com/RustPython/RustPython/pull/4615/commits/cdac5cfb69ee5bc976164b1da05d2b0ebac2ca1e to create PyNumberSlots to save both left and right binary ops.

I am bit confuse about the right_ops witch did not exist in cpython, why can't we just swap the direction as what we doing before?

As in the example #4615 (comment) , left and binary ops and be defined separately. So we need to store them separately. Please check the latest commit cdac5cf using PyNumberSlots to save both left and right binary ops.

Oh, I see the trick.

I temporarily implemented Number Protocol for PyBool in commit https://github.com/RustPython/RustPython/pull/4615/commits/22fca357c587ff9c0315ff11b14c03c6e1ab7885  to see whether this PR can pass all the tests.

As discussed in https://github.com/RustPython/RustPython/pull/4639 , Number Protocol of PyBool will be implemented by inheriting slots of PyInt, which depends on this PR.
This PR also requires Number Protocol of PyBool to pass tests.

So let me deprecate the PR https://github.com/RustPython/RustPython/pull/4639 and implement it within this PR.

As in https://github.com/RustPython/RustPython/actions/runs/4357591970/jobs/7617136283 ,
2 tests failed:
    test_array test_bytes

TypeError: '*' not supported between instances of 'int' and 'array'

RUST_BACKTRACE=1 cargo run Lib/test/test_bytes.py

thread 'main' panicked at 'assertion failed: self.payload_is::<T>()', vm/src/object/core.rs:730:9

mod operator of bytes and array is not communicative like numeric types. their mod and rmod are different.

I found why array doesn't work. It missed update_slot. I can fix it tomrorow.

Since related changes in this PR seem to increase along the way, now it may be a good timing to move the following loosely coupled part to another PR as prerequisite of the current one.

Refactor all existing Number Protocol methods (actually only some of them need big changes)

so that they accept arguments of type similar to (&PyObject, &PyObject, &VirtualMachine)
within this method, we don't need to consider whether the caller comes from left or right binary op, and the method just needs to handle two PyObject arguments and return the value (or not_implemented) as expected

Then these methods can be used by both left and right binary ops in the current PR

@youknowone If you also agree with the approach, I will open a new PR to work on that as prerequisite of the current PR.

I pushed latest PR at https://github.com/RustPython/RustPython/commit/a2da2d20ae0c49d9ac3e8e7bb6a8c419816e8e58 , which contains 3 Temp commits for testing purpose to see whether there're any other test failures in CI.

From latest CI after the temp fixes,

there's a minor clippy warning, and I've fixed it locally

the following tests failed

test_collections test_dict test_dictviews test_types

test_collections

methods defined in ChainMap like __or__ not taking effect

test_dict

need to implement Number Protocol for PyDictItems

'^' not supported between instances of 'dict_items' and 'dict_items'

test_dictviews

need to implement Number Protocol for PyDictKeys

'&' not supported between instances of 'dict_keys' and 'list_iterator'

test_types

'|' not supported between instances of 'GenericAlias' and 'GenericAlias'

After (temporarily) implementing Number Protocol for PyDictKeys and PyDictItems, now test_dict and test_dictviews succeeded, with the following two testing errors remained.
https://github.com/RustPython/RustPython/actions/runs/4371776446/jobs/7647999208
test_collections test_types

I agree we need to remove PyNumber from PyNumberMethods.
But it will last on PyNumberSlots.
I will take a look how we can handle it smart way.
@qingshi163 because this PR is already huge, I'd like to merge it unless it has obvious wrong design or bugs. could you review it?

Now that the PR has past the CI, except for the WASM error inherited from main branch.
I will proceed to refactor it a little bit, and add necessary TODO comments where needed.

I've rearranged the commits and pushed to the PR.
Please help to review based on this version.
Some commits are marked as Temp intentionally, as they may be further improved in separate PRs.

@youknowone
The latest CI failed with Clippy error, but that part of source has not been changed for a long time. Why suddenly CI treats it as an error and makes the CI fail?
https://github.com/RustPython/RustPython/actions/runs/4375751891/jobs/7656913583

The latest CI failed with Clippy error, but that part of source has not been changed for a long time. Why suddenly CI treats it as an error and makes the CI fail?
https://github.com/RustPython/RustPython/actions/runs/4375751891/jobs/7656913583

Perhaps it has to do with Rust 1.68.0 being released.

@youknowone

let me handle 1.68 things
Please help to check my comments in https://github.com/RustPython/RustPython/pull/4673 in case they're useful.

Thanks!

Sorry for late review, as long as the ci passed, we can accept this pr.
But there is something I want to clarify:

Heap type is the type which created dynamicly like class in python etc.
Heap type will have HeapTypeExt witch is the extra space only allocate for heap type.
PyTypeSlots::as_number, as_sequence, as_mapping etc is a pointer to tell the type where to look for the function and it has only two possible place to pointing witch is either a static function from AsNumber::as_number or a self-referenced HeapTypeExt::number_methods etc.
The type slots for number, sequence, mapping is not necessary but for speedup, witch means we can always fallback to a wrapper to call in python.
For right_* functions I think we can have a generic way to do it, to put it into the type slots is not ideal, we do not need to store the r* functions, we just need to fallback the type.
The PyNumber type it self is loosy, when convert from PyObject to PyNumber it will just give a empty implement if the object is not supporting number protocol.
Cpython is inherit the slots but this makes the complex while you updateing the parent class's slot than need to recusively fallback all the subclasses's slots, the way we doing to search via mro maybe will slow down a little bit(I don't think will be big as most internal type should reach the protocol in the first loop) but much easier for now.

@qingshi163 All other parts sounds good, but for No. 5, for each binary operator, having 2 slots and 1 number method is the CPython design.

@qingshi163 All other parts sounds good, but for No. 5, for each binary operator, having 2 slots and 1 number method is the CPython design.

https://github.com/python/cpython/blob/main/Include/cpython/object.h
https://github.com/python/cpython/blob/ca066bdbed85094a9c4d9930823ce3587807db48/Objects/typeobject.c#L7221-L7242
cpython do not store the right_* functions in the type slots, it fallback the slots and than call it opposite direction

we have a little bit different design now, so the wrapper looks different. but isn't wrap_binaryfunc_r the wrapper used by RBINSLOT as one of the 2 binaryfunc entries?

Measure performance enhancement of this PR

Download https://github.com/python/pyperformance/blob/main/pyperformance/data-files/benchmarks/bm_nbody/run_benchmark.py to benches/benchmarks/bm_nbody.py

Before patch

% git log -n1
commit 1fceeab0fcc77c11dfe94092b27b2164b94d62e4 (HEAD)
Merge: 51020cd63 4d05077ec
Author: Jeong YunWon<EMAIL_ADDRESS>Date:   Thu Mar 9 21:19:47 2023 +0900

    Merge pull request #4674 from carlosmiei/copy-update

    Update copy.py from CPython 3.11

% cargo run --release benches/benchmarks/bm_nbody.py -o base.json
.....................
nbody: Mean +- std dev: 4.01 sec +- 0.17 sec

% cargo run --release benches/benchmarks/bm_nbody.py -o base2.json
.....................
nbody: Mean +- std dev: 3.91 sec +- 0.14 sec

After patch

% git log -n1
commit ea665cb743ef1f2a1a2b6030e8384d7ab814b305 (HEAD)
Merge: 1fceeab0f 228772020
Author: Jeong YunWon<EMAIL_ADDRESS>Date:   Fri Mar 10 02:47:01 2023 +0900

    Merge pull request #4615 from xiaozhiyan/binaryops-with-number-protocol

    Improve: binary ops with Number Protocol

% cargo run --release benches/benchmarks/bm_nbody.py -o patch.json
.....................
nbody: Mean +- std dev: 1.24 sec +- 0.08 sec

% cargo run --release benches/benchmarks/bm_nbody.py -o patch2.json
.....................
nbody: Mean +- std dev: 1.28 sec +- 0.12 sec

CPython 3.11

% python -V
Python 3.11.0

% python benches/benchmarks/bm_nbody.py -o cpython.json
.....................
nbody: Mean +- std dev: 101 ms +- 2 ms

% python benches/benchmarks/bm_nbody.py -o cpython2.json
.....................
nbody: Mean +- std dev: 104 ms +- 7 ms

Performance comparison

% pyperf compare_to cpython.json patch.json base.json --table
+-----------+---------+-------------------------+-------------------------+
| Benchmark | cpython | patch                   | base                    |
+===========+=========+=========================+=========================+
| nbody     | 101 ms  | 1.24 sec: 12.28x slower | 4.01 sec: 39.79x slower |
+-----------+---------+-------------------------+-------------------------+

% pyperf compare_to cpython2.json patch2.json base2.json --table
+-----------+----------+-------------------------+-------------------------+
| Benchmark | cpython2 | patch2                  | base2                   |
+===========+==========+=========================+=========================+
| nbody     | 104 ms   | 1.28 sec: 12.34x slower | 3.91 sec: 37.54x slower |
+-----------+----------+-------------------------+-------------------------+


Copperhead 4.12 does not build

Issue description
This build fails with
  CC [M]  fs/ubifs/lprops.o
In file included from /tmp/nix-build-linux-4.12-a.drv-0/linux-hardened-4.12.a-src/include/linux/elf.h:4:0,
                 from /tmp/nix-build-linux-4.12-a.drv-0/linux-hardened-4.12.a-src/include/linux/module.h:15,
                 from /tmp/nix-build-linux-4.12-a.drv-0/linux-hardened-4.12.a-src/fs/binfmt_elf.c:12:
/tmp/nix-build-linux-4.12-a.drv-0/linux-hardened-4.12.a-src/fs/binfmt_elf.c: In function 'randomize_stack_top':
/tmp/nix-build-linux-4.12-a.drv-0/linux-hardened-4.12.a-src/arch/x86/include/asm/elf.h:326:56: error: 'mmap_rnd_compat_bits' undeclared (first use in this function)
 #define __STACK_RND_MASK(is32bit) ((is32bit) ? (1UL << mmap_rnd_compat_bits) - 1 : (1UL << mmap_rnd_bits) - 1)
                                                        ^
/tmp/nix-build-linux-4.12-a.drv-0/linux-hardened-4.12.a-src/arch/x86/include/asm/elf.h:327:24: note: in expansion of macro '__STACK_RND_MASK'
 #define STACK_RND_MASK __STACK_RND_MASK(mmap_is_ia32())
                        ^
/tmp/nix-build-linux-4.12-a.drv-0/linux-hardened-4.12.a-src/fs/binfmt_elf.c:672:22: note: in expansion of macro 'STACK_RND_MASK'
   random_variable &= STACK_RND_MASK;
                      ^
/tmp/nix-build-linux-4.12-a.drv-0/linux-hardened-4.12.a-src/arch/x86/include/asm/elf.h:326:56: note: each undeclared identifier is reported only once for each function it appears in
 #define __STACK_RND_MASK(is32bit) ((is32bit) ? (1UL << mmap_rnd_compat_bits) - 1 : (1UL << mmap_rnd_bits) - 1)
                                                        ^
/tmp/nix-build-linux-4.12-a.drv-0/linux-hardened-4.12.a-src/arch/x86/include/asm/elf.h:327:24: note: in expansion of macro '__STACK_RND_MASK'
 #define STACK_RND_MASK __STACK_RND_MASK(mmap_is_ia32())
                        ^
/tmp/nix-build-linux-4.12-a.drv-0/linux-hardened-4.12.a-src/fs/binfmt_elf.c:672:22: note: in expansion of macro 'STACK_RND_MASK'
   random_variable &= STACK_RND_MASK;
                      ^
  CC [M]  fs/xfs/libxfs/xfs_attr_remote.o
make[2]: *** [/tmp/nix-build-linux-4.12-a.drv-0/linux-hardened-4.12.a-src/scripts/Makefile.build:302: fs/binfmt_elf.o] Error 1

I am currently investigating, just creating the issue for tracking purposes.
I believe Copperhead/linux-hardened@89aae326916d6a73b3168b6567e2190b54f425c0 may be the solution.
Currently building that revision, will come back once it is confirmed building.
Steps to reproduce
nix-build -A linux_hardened_copperhead

I have reverted the 4.12.a update in cd1f998289 and will hold off on 4.12 builds until I can confirm they work properly. As per discussion on the linked comment, 4.12.a is a pre-release.


Store too many retried jobs into a set of dead jobs

After too many retries the job should be inserted into a set of dead jobs. The set should have a maximum of X dead jobs.
X could be 1000 for now?

Done by https://github.com/edgurgel/verk/pull/22 . Thanks, @bastos ;)


feat: add FetchIDL method to fetch idl json data

Add a method program.FetchIDL same as here https://github.com/project-serum/anchor/blob/master/ts/src/program/index.ts

hey @godtoy
being able to fetch IDLs from the chain is a very useful thing to have! :smile:
from a first look, it looks good to me.
but can you please use the standard go formatter?

Do u mean the code formatter ? should i exec go fmt ... first right?

Hey i just finished go fmt ... submit

How about changing the test to something like this:

Instead of asserting a size equality, how about asserting json content field? How about idlJSON["name"] == "nft_magiceden"?

Yep, u are right. becase magiceden contact has been updated 2 days ago.