webidl-tests/global.rs test fails

Describe the Bug
crates/webidl-tests/global.rs test fails on Ubuntu (18.04.2 / 18.10) with following message:
error[E0428]: the name `__WASM_BINDGEN_GENERATED_1d041a847919c908` is defined multiple times
   --> /home/alexlapa/CLionProjects/wasm-bindgen-fork/target/wasm32-unknown-unknown/debug/build/webidl-tests-54f588f47d44762e/out/global.rs:359:1
    |
359 | pub static __WASM_BINDGEN_GENERATED_1d041a847919c908: [u8; 490usize] = {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `__WASM_BINDGEN_GENERATED_1d041a847919c908` redefined here
    |
   ::: crates/webidl-tests/global.rs:7:1
    |
7   | #[wasm_bindgen]
    | --------------- previous definition of the value `__WASM_BINDGEN_GENERATED_1d041a847919c908` here
    |
    = note: `__WASM_BINDGEN_GENERATED_1d041a847919c908` must be defined only once in the value namespace of this module

error: aborting due to previous error

For more information about this error, try `rustc --explain E0428`.
error: Could not compile `webidl-tests`.

Steps to Reproduce
Run WBINDGEN_I_PROMISE_JS_SYNTAX_WORKS_IN_NODE=1 cargo test -p webidl-tests --target wasm32-unknown-unknown on Ubuntu.
I can build and provide Docker image, if that helps.
Additional Context

Other tests work fine.
Env on failing machines:

$ wasm-pack --version
wasm-pack 0.6.0

$ rustc -V
rustc 1.35.0-nightly (bc44841ad 2019-03-14)

$ node -v
v10.15.3

It works on MacOS (same versions of specified tools).
Generated out/global.rs: https://www.diffchecker.com/mA1ufA1h

Hm I'm having trouble reproducing this locally on Linux as well. Can you run rustup update nightly and try again? Additionally can you gist rustc -vV?

@alexcrichton ,
$ rustc -vV
rustc 1.35.0-nightly (bc44841ad 2019-03-14)
binary: rustc
commit-hash: bc44841ad2a2ad5f6c5e67b9e35ed8e7e71d4dc7
commit-date: 2019-03-14
host: x86_64-unknown-linux-gnu
release: 1.35.0-nightly
LLVM version: 8.0

After rustup update nightly
$ rustc -vV
rustc 1.35.0-nightly (3eb4890df 2019-03-19)
binary: rustc
commit-hash: 3eb4890dfe6db0279fdd3cda19f9643873ae3db9
commit-date: 2019-03-19
host: x86_64-unknown-linux-gnu
release: 1.35.0-nightly
LLVM version: 8.0

Still crashes. I will create Docker image and link it here.

@alexcrichton ,
Dockerfile:
FROM ubuntu:18.10

ENV WBINDGEN_I_PROMISE_JS_SYNTAX_WORKS_IN_NODE 1
ENV PATH "$PATH:/root/.cargo/bin/"

RUN apt-get update && apt-get install -y \
    curl \
    git \
    build-essential

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly \
    && rustup target add wasm32-unknown-unknown --toolchain nightly \
    && git clone https://github.com/rustwasm/wasm-bindgen.git

WORKDIR /wasm-bindgen

CMD cargo test -p webidl-tests --target wasm32-unknown-unknown

No node of geckodriver, since it fails earlier. It is published, so you can just do docker run alexlapa/wasm-test-fail:latest.

Hm something very fishy is going on? I created Dockerfile with the above and ran:
$ docker build -t tag .
$ docker run -it tag

and it didn't fail in the expected place (went on to build wasm-bindgen and failed because OpenSSL wasn't installed). I also ran docker run alexlapa/wasm-test-fail:latest and it "succeeded" in that it failed the same place as the local image, not the expected place.
Can you gist a transcript of the commands you ran to get the bug?

@alexcrichton,
So i've added pkg-config and libssl-dev to image, ie:

FROM ubuntu:18.10

ENV WBINDGEN_I_PROMISE_JS_SYNTAX_WORKS_IN_NODE 1
ENV PATH "$PATH:/root/.cargo/bin/"

RUN apt-get update && apt-get install -y \
    curl \
    git \
    build-essential \
    pkg-config \
    libssl-dev

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly \
    && rustup target add wasm32-unknown-unknown --toolchain nightly \
    && git clone https://github.com/rustwasm/wasm-bindgen.git

WORKDIR /wasm-bindgen

CMD cargo test -p webidl-tests --target wasm32-unknown-unknown

Published as alexlapa/wasm-test-fail:2.
And ran it on 3 machines(2 Ubuntu and Mac). Only one Ubuntu fails with that "redefined here" message.  So yeah, i got single image that behaves differently. I guess, issue can be closed, since it is not really reproducible in other environments. Anyway, i will post update when i will resolve it (or not, if i will decide to reinstall Ubuntu on failing machine).

Hm so in theory if docker is not reproducible this could be a kernel difference between the two machines. Despite that though I'm not actually sure how we could cause kernel differences to show up here...

This is a bit old now so I'm gonna go ahead and close this, but let us know if this resurfaces!


Yatin: Watch (?-i:IuItl83477A)(?# youtube)

Yatin requests the watch of the watch_keyword (?-i:IuItl83477A)(?# youtube). See the MS search here and the Stack Exchange search in text, in URLs, and in code.

(?-i:IuItl83477A)(?# youtube) has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by Spevacus in Charcoal HQ


Uncaught exception 'GuzzleHttp\Exception\RequestException' with message 'cURL error 60: SSL certificate problem

I'm trying to get the basic example bot working that is shown in the readme.php
But whenever I try to load it I get this error:
Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in C:\Dev_enviorment\wamp64\www\Discord-Bot\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:187
Stack trace:
#0 C:\Dev_enviorment\wamp64\www\Discord-Bot\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(150): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array)
#1 C:\Dev_enviorment\wamp64\www\Discord-Bot\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(103): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#2 C:\Dev_enviorment\wamp64\www\Discord-Bot\vendor\guzzlehttp\guzzle\src\Handler\CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#3 C in C:\Dev_enviorment\wamp64\www\Discord-Bot\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 187
this is the code in the php file
<?php

include __DIR__.'/vendor/autoload.php';

$token = 'MY_TOKEN';

use Discord\Discord;
use Discord\WebSockets\WebSocket;

$discord = new Discord($token);
$ws      = new WebSocket($discord);

$ws->on('ready', function ($discord) use ($ws) {
    echo "Bot is ready!".PHP_EOL;

    // We will listen for messages
    $ws->on('message', function ($message, $discord) {
        echo "Message from {$message->author->username}: {$message->content}".PHP_EOL;
    });
});

$ws->run();

Fixed on the Discord-API chat
The fix was to follow these steps: http://stackoverflow.com/questions/21114371/php-curl-error-code-60

This is NOT fixed. Telling users to simply install some random certificate authority we know nothing about is a terrible way to resolve this issue.

Please have a little bit more grave when responding to issues. You are more likely to receive help when being courteous.

As for who the cert is from...
https://curl.haxx.se/docs/caextract.html


Don't change conditions to equivalent expressions during decompilation

Changing conditions to equivalent ones generates a decompiler output which is harder to understand.
For example this:
                         LAB_6000207c
    6000207c 83 f9 08        CMP        ECX,0x8
    6000207f 7f 0f           JG         LAB_60002090
    60002081 83 fa 08        CMP        EDX,0x8
    60002084 7e 05           JLE        LAB_6000208b
    60002086 b8 10 27        MOV        result,0x2710
             00 00
                         LAB_6000208b
    6000208b 83 f9 08        CMP        ECX,0x8
    6000208e 7e 08           JLE        LAB_60002098
                         LAB_60002090
    60002090 83 fa 08        CMP        EDX,0x8
    60002093 7f 03           JG         LAB_60002098
    60002095 c1 e0 02        SHL        result,0x2

was decompiled to:
if (iVar1 < 9) {
  if (8 < bpp) {
    result = 10000;
  }
  if (iVar1 < 9) {
    return result;
  }
}
if (bpp < 9) {
  result = result << 2;
}

}
In assembly, the variable was compared to the constant using less-equal, but in the decompile it's compared to the constant+1 using less. It's correct, but the resulting decompile is harder to understand. This code dealt with setting bit-depth of the screen and while a 8-bit bit-depth was meaningful, 9-bit bit-depth feels out of place in this context.
Ghidra should either use the same operation as in assembly or allow us to choose it via something like the "Convert" option for constants in the "Listing" view.

Ghidra Version: 9.0.2

As another point on clarity/consistency, similar compare instructions decompile into expressions with differing ordering of their operands.  In the above example, the first and last CMP EDX have swapped operands in the decompile - one puts the constant on the left of the expression, the other on the right.
There are some that believe any constant of an "if" expression should be on the left, as it helps catch accidental use of assignment instead of equality.  But either way, the decompiled output above is inconsistent.
(Figured it might be better to camp onto this bug instead of essentially duplicating most of it.)

Here is a similar issue.  Consider the following:
typedef struct {
        unsigned int n;
        unsigned int **r;
}S;
extern void init(unsigned int *x);
void foo(S *p) {
        int i;
       for(i=0; i<p->n; i++)
                init(p->r[i]);
}
On Ubuntu 16.04 X86 64 bit, gcc 5.4 -O3 turns the loop into (this from objdump):
18:	49 8b 44 24 08       	mov    0x8(%r12),%rax
1d:	83 c3 01             	add    $0x1,%ebx
20:	48 8b 3c 28          	mov    (%rax,%rbp,1),%rdi
24:	48 83 c5 08          	add    $0x8,%rbp
28:	e8 00 00 00 00       	callq  2d <foo+0x2d>
2d:	41 39 1c 24          	cmp    %ebx,(%r12)
31:	77 e5                	ja     18 <foo+0x18>
(The compiler turns the loop into if(p->n!=0)do{...}while(i<p->n);)
The Ghidra 9.0.1 decompiler turns the condition of the test/branch at the bottom of the loop into uVar2 <= *puParm1 && *puParm1 != uVar2 (I've dropped the casts.) This amounts to turning the loop condition into i<=p->n && p->n != i. (Here uVar2 is i and puParam1 is p.)
I had to stare at this for a while to convince myself that it was correct.

Ghidra 9.0.1

I think a better way to handle this is to allow interactively inverting the if conditions.

There are some that believe any constant of an "if" expression should be on the left, as it helps catch accidental use of assignment instead of equality. But either way, the decompiled output above is inconsistent.

I think this should never be done, any modern compiler flags this as an error. Yoda conditions are less readable.

I agree, please change -1 < voltage  into voltage > -1


Question about DI

Hi.I don't wonna start the holy war. I just want to understand. What's reason to make your own di conteiner? Maybe using existing di like http://php-di.org is better idea?

It is already done, it works well. Framework can work with any PSR-compatible container so if you prefer PHP-DI you can use it.


Fix for low zombie blood

About the PR
Fix for zombification did not replaced any blood
#31912
Why / Balance
Bugfix
Technical details
RemoveReagent did not work in ChangeBloodReagent because it tried to remove only blood without data (without dna).
Media
https://github.com/user-attachments/assets/467d6149-ef2c-40e3-910c-b5283d460d36
Requirements

[x] I have read and am following the Pull Request and Changelog Guidelines.
[x] I have added media to this PR or it does not require an ingame showcase.

Breaking changes
Changelog
🆑

fix: Zombies once again have zombie blood.

Thank you for your first contribution!
Tested in-game and zombies now indeed possess zombie blood

Thanks for the review.

Tested and works as intended. Thanks for the fix.


fix(h3): always return a response to support non-preemptive routers

See https://github.com/unjs/h3/issues/628#issuecomment-1910087778 for more context.

Thank you 🙏


textarea on firefox have an extra height space corresponding to the horizontal scroolbar height

On firefox, contrary to all other browser, textarea have an extra height space corresponding to the horizontal scroolbar height.
Whereas it is impossible to have a horizontal scrollbar on a textarea.
Assigning a rows value of 3 and it appears to have 4.
It can easily be fixed by setting:
textarea {
    overflow-y: auto;
    overflow-x: hidden;
}

Bug reports must include a live demo of the problem. Per our contributing guidelines, please create a reduced test case via JS Bin or CodePen and report back with your link, Bootstrap version, and specific browser and OS details.

Live Demo:
https://jsbin.com/pogiwaqusu/edit?html,css,output

I don't see Bootstrap in your live example 🤔

Because it makes no difference

I don't think we'd want to add this universally? I did run into this on our new docs homepage, but I'm unsure if it's something we should explicitly add.


Clean up Prometheus metrics for deleted Certificates

What this PR does / why we need it:
Prometheus metrics for Certificates will be cleaned up by deleting entries for deleted Certificates, and keeping track of which Certificates are currently registered by Prometheus.
This prevents metrics for deleted Certificates from being exposed past their use.
Which issue this PR fixes: fixes #1332
Special notes for your reviewer:
The metrics are currently cleaned up every minute via a goroutine in the certificate controller - I would be happy to discuss a more refined garbage collection scheme to implement.
Release note:

Prometheus metrics for deleted Certificates are cleaned up

Looks like your rebase may have gone a bit weird, as you're including a commit from another PR 🙈

If you do an 'interactive rebase', you should be able to 'drop' that commit.


Detect screen recording on Android

Hi @0xlethe ,
Do we have any way to detect screen recording on Android?

@huynextlevel maybe detect screen for use accessibilityservice, but i think didnt do it.

Thank you so much @0xlethe !


Opt-in CLI usage metrics and configuration

What would you like to be added:

Users should be prompted whether to opt-in to upload usage metrics
Users should be prompted whether to opt-in to upload non-sensitive environmental information for better failure resolution

Why is this needed:
Having this information would improve the the developer and support experience

+1 yes please


Inspect Option Support?

Should have support for:
inspect:
Inspect defaults to true which is great for dev environments, but not so good if it's a production one.

entrypoint.zip


make the code making HTTP requests more testable

This should be heavily simplified and made easy to mock out, so that we can better test.

Commit 10bca189865087ce5d2d5fa0ca256c8d8c33257b gives a more central point for mocking, but it's not done yet.

Commit 809d5114b89e306cf9c1cc8ede9c1bf2f5b10f8d went further, as was needed, so while we might not be actually testing everything we could, code making HTTP requests is indeed testable. :smiley:


Missing Check on Yoshi's Island

There's a Bub-ulb in Sushi's Room on Yoshi's Island that wasn't included in the checks

That Bub-ulb does not give you an item. You instead receive the 4th Magical Seed from Kolorado after returning the Volcano Vase.

Shows you how long it's been since I've played the regular game lol


SingleCellNMF

Here I implement non-negative matrix factorization and demonstrate its utility on simulated single-cell ATAC-seq and RNA-seq data. Specific term in objective function allows aggregating sparse epigenetic signal:

Codecov Report

Merging #12 (0879853) into master (bc81b6e) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master       #12   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            2         3    +1
  Lines            4        30   +26
=========================================
+ Hits             4        30   +26

Impacted Files
Coverage Δ

src/STMOZOO.jl
100.00% <ø> (ø)

src/single_cell_nmf.jl
100.00% <100.00%> (ø)

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 bc81b6e...0879853. Read the comment docs.

@MichielStock what is the best place to put sample data for the notebook? Like couple csv files.

@MichielStock, what is the best place to put sample data for the notebook? Like couple csv files.

The best place is somewhere else ;-)
Can you illustrate the code on small examples coded in the notebook? If not, you can use the function download in Pluto to download a file.
Worst-case you can make a folder data in the repo but preferably not since this will bloat the repo.

@MichielStock thanks! I guess it's quite common to include the sample data with R packages, don't know much about Julia. But I can certainly download the files within a notebook.

You can do it, but it is just not tidy for our purposes.

On 16 Dec 2020, at 11:16, Igor Filippov<EMAIL_ADDRESS>wrote:
@MichielStock https://github.com/MichielStock thanks! I guess it's quite common to include the sample data with R packages, don't know much about Julia. But I can certainly download the files within a notebook.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/MichielStock/STMOZOO/pull/12#issuecomment-746039979, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABN5PI5JEJWYEILA5K3KAZ3SVCCHVANCNFSM4UKSPMDQ.

I get an error when running test.
Your functions work with DataFrames, Would it not be more tidy if they work with matrices or abstract matrices and the user has to put them in the desired format. I would try to remove the dependency on DataFrames
you might use unicode for your greek letters (alpha, gamma), though this is a matter of taste
in the notebook, you can use the julia function download (but first check if the file exists) you can also run UNIX commands via julia run(`cmd`)`
sadly an error MethodError: no method matching update_W_atac(::Array{Float64,2}, ::Array{Float64,2}, but it looks quite impressive

So, fix the error and I think you are more or less set!

@MichielStock thanks!
Could you give me a hand, please? How do you run the tests and what's the full error look like? Maybe I'm running it wrong?
julia> ]
(STMOZOO) pkg> activate .
(STMOZOO) pkg> test

And I get the following output:

This is what I get? It seems to be an ordinary Julia method error. Maybe I am not working on your latest version?

@MichielStock thanks!
https://github.com/MichielStock/STMOZOO/pull/12/commits/fdfede1e53459839c994b1b84f0fba288ce05ade was the right commit. Just to be sure I added a dead simple Docker image https://github.com/MichielStock/STMOZOO/pull/12/commits/a23aca4d9fd1e61f6053f763f13098b1004f4a03.
You can run it like so:
docker run -it iamfilippov/stmozoo

Which opens a Julia console inside the container. You can verify the tests by running:
julia> using Pkg; Pkg.test("STMOZOO")

@MichielStock as for DataFrames, I'd like the row names to be present in the result, so that users can reference modality loadings by the original gene or locus name. As far as I know, Julia 2d arrays don't support row names.

Needs to be reviewed tomorrow by @tjvneste, @kirstvh and @csangara

Needs to be reviewed tomorrow by @tjvneste, @kirstvh and @csangara

Probably easier if I comment here:

In general => good structure in the code 👍
I would document the functions a little more so that it is clear what exactly the inputs and outputs are for the different functions (or at least the main functions)
The if loops @ the beginning of some functions can probably be replaced by @asserts

Probably easier if I comment here:

In general => good structure in the code 👍
I would document the functions a little more so that it is clear what exactly the inputs and outputs are for the different functions (or at least the main functions)
The if loops @ the beginning of some functions can probably be replaced by @asserts

I tried to upload the documentation but it gave my this error. I don't know if this is my fault or if it is wrong?

I tried to upload the documentation but it gave my this error. I don't know if this is my fault or if it is wrong?

@tjvneste thanks for the review!

I would document the functions a little more so that it is clear what exactly the inputs and outputs are for the different functions (or at least the main functions)

You're right.

The if loops @ the beginning of some functions can probably be replaced by @asserts

I chose throwing exceptions deliberately, since ArgumentError gives a clear indication that the function failed due to the invalid argument provided by the user.

I tried to upload the documentation but it gave my this error. I don't know if this is my fault or if it is wrong?

How did you do it?

@tjvneste thanks for the review!

I would document the functions a little more so that it is clear what exactly the inputs and outputs are for the different functions (or at least the main functions)

You're right.

The if loops @ the beginning of some functions can probably be replaced by @asserts

I chose throwing exceptions deliberately, since ArgumentError gives a clear indication that the function failed due to the invalid argument provided by the user.

I tried to upload the documentation but it gave my this error. I don't know if this is my fault or if it is wrong?

How did you do it?

How did you do it?
I just ran the make.jl file and then opened the html.

How did you do it?
I just ran the make.jl file and then opened the html.

Great project!

The source code is really clean and well-structured, and there is sufficient testing
The documentation gives a good overview to the problem
The notebook is illustrative and to-the-point

Other remarks:

I got this error when reading in the files: ArgumentError: provide a valid sink argument. I had to change the code to rna_data = CSV.read(rna_file, DataFrame) for it to work, but maybe it's just me.
In the Pluto notebook, the code to generate markdown was still visible for me; it might look nicer if you made the code invisible and only showed the markdown.

I made some small changes to your documentation and notebook which you can see in the pull request.

Great project!

The source code is really clean and well-structured, and there is sufficient testing
The documentation gives a good overview to the problem
The notebook is illustrative and to-the-point

Other remarks:

I got this error when reading in the files: ArgumentError: provide a valid sink argument. I had to change the code to rna_data = CSV.read(rna_file, DataFrame) for it to work, but maybe it's just me.
In the Pluto notebook, the code to generate markdown was still visible for me; it might look nicer if you made the code invisible and only showed the markdown.

I made some small changes to your documentation and notebook which you can see in the pull request.

Hi,
I think you made a really nice project that covers an interesting subject!
•	Tidy code
•	Tests did run well
•	Notebook together with documentation did clarify the concept for me, but additional info about inputs and outputs of functions in the documentation would help to better understand the entire code and functions
Some small remarks for the notebook:
•	Downloading the files for the notebook did not work for me with the “run” command, but it did work with “download” command
•	I got the following error in the cell where the data is reformed to a dataframe (error gives solution to problem):   ArgumentError: provide a valid sink argument, like using DataFrames; CSV.read(source, DataFrame)
Kirsten

Hi,
I think you made a really nice project that covers an interesting subject!
•	Tidy code
•	Tests did run well
•	Notebook together with documentation did clarify the concept for me, but additional info about inputs and outputs of functions in the documentation would help to better understand the entire code and functions
Some small remarks for the notebook:
•	Downloading the files for the notebook did not work for me with the “run” command, but it did work with “download” command
•	I got the following error in the cell where the data is reformed to a dataframe (error gives solution to problem):   ArgumentError: provide a valid sink argument, like using DataFrames; CSV.read(source, DataFrame)
Kirsten

@csangara @kirstvh thanks!
Have never seen the issue with loading CSV, will check it out.
As for download, it seems that the function is rather platform specific. It didn't work for me on macOS, so I opted out for wget with run.

@csangara @kirstvh thanks!
Have never seen the issue with loading CSV, will check it out.
As for download, it seems that the function is rather platform specific. It didn't work for me on macOS, so I opted out for wget with run.

@tjvneste
I've checked and it rendered for me, so maybe it's platform-specific issue.

@tjvneste
I've checked and it rendered for me, so maybe it's platform-specific issue.


[FEATURE REQUEST] Unix-like Build

Linux/BSD will have their future compilation?

That would require a linux machine tho

ok


Permission Denied when trying to edit settings Ctrl-s

Hi,
Amazing integration, loving yai so far. However if i try and edit the settings from within Yai using Ctrl-S it says permission denied and the path the settings file in ~/config/
Also when it installed it asked for root permissions, why does it need root permission on install and is that normal?

No I am still getting the same issue.
I am using zsh as my shell. So if i run your install script piped to bash it asks for superuser privileges for some reason?
If i change bash to zsh it installs without asking for sudo password
I still receive the permissions issue on the settings file though when executing ctrl-s in yai
If I change the permissions to 775 i get these errors
.config/yai.json: line 2: openai_key:: command not found
.config/yai.json: line 3: openai_max_tokens:: command not found
.config/yai.json: line 4: openai_model:: command not found
.config/yai.json: line 5: openai_proxy:: command not found
.config/yai.json: line 6: openai_temperature:: command not found
.config/yai.json: line 7: user_default_prompt_mode:: command not found
.config/yai.json: line 8: user_preferences:: command not found
yai is working though

What is your system EDITOR environment variable value? If not set could you set it to vim or nano and try edit again?

Closing for inactivity

I'll reopen this. :)
It seems to be an issue with the maintainer, I would have to guess. They might not be allowing your install script to do its thing.
I installed yai this morning using yay package manager on Manjaro Linux 23 and I got the same issue when running yai. I'll share a screenshot as it might reveal more information.

I think the error is coming from yai or yai is propagating it to the screen. Perhaps a verbose output would be better at helping to debug this.
What has me confused is why is my shell being used to access the JSON file? Typically, we'd use jq (JSON query) to parse a JSON file. But then I'm just throwing ideas.
It might help if you had a wiki enabled with further details on the various aspects of yai as well as one that details what the yai.json looks like, which would be useful for those of us that like to manually build stuff with things go awry.
The wiki could have a troubleshooting section for the various issues that are going to popup.
And yes, yai, is one of, if not the best implementation I've encountered for OpenAI in shell.
Interestingly, just now. I removed the AUR package I used and installed yai with your aforementioned instructions on the overview page using the curl method. I got the same issue as in the screenshot. But it only appears when doing CTRL+s, also yai is not currently asking for an openai.key.
The out from ls -l yai.json
[kreezxil@kreezxil-k54c .config]$ ls -l yai.json
-rw-rw-r-- 1 kreezxil kreezxil 245 Nov 11 07:08 yai.json

The content of the starting yai.json,

it contains a key, how did you get a key that isn't costing money? either that or you're in the poor house now.
if you need anything i'll carry that ball, let me know what you need. :)

@kreezxil
you have to set your editor default in shell.
echo 'export EDITOR=vim' >> ~/.zshrc
source ~/.zshrc
for me

@kreezxil
you have to set your editor default in shell.
echo 'export EDITOR=vim' >> ~/.zshrc source ~/.zshrc
for me

Thanks.


Implement conversion from IBufferProtocol to IList in Binder

This PR originated from a failing codecs test. It turns out that all codec functions accept a 'b' type array just as well as Bytes. At first I thought of adding another overload accepting IBufferProtocol objects, but it turns out that [BytestConversion]IList<byte> will catch array as well. However, it does not go through IBufferProtocol, instead what is happening is that the binder sees that array implements IList<object> and wraps it in ListGenericWrapper<byte>, hoping for the best.
But it does not work. ListGenericWrapper<byte>, on access or on copy (which is triggered by ToArray() in the first line of StringOps.DoDecode) accesses each element as object and unboxes to byte. But the array, even for type 'B', when accessed thought IList<object>, boxes its elements to int for some reason. Even if I changed that and made array box a byte, this still would not be good enough: the conversion will fail for other array types, like sbyte or float, and in CPython all objects work as long as they support the buffer protocol:
>>> codecs.latin_1_decode(array.array('f', [12345.67]))
('®æ@F', 4)

So it is clear that wrapping in ListGenericWrapper<byte> is not a way to do it. In the end I went aheand modyfing the Binder logic to do the conversion on the fly in the expression tree. This seems to do the right thing, does it?
Questions/issues:

Is BytesConversionAttribute really needed? I do not see it being checked/used anywhere by the Binder.

Wouldn't it be better to wrap IBufferProtocol objects on binding and serialize to a memory stream only on access? This would delay the serialization to when the object is actually accessed, rather than having it done already in the binding expression tree.

Use a dedicated attribute to enable this functionality, e.g. BufferProtocolAttribute? In this way, BytesConversion will be used only for Bytes and ByteArray, and MemoryView. On the other hand, I haven't found a case when BytesConversion would apply but BufferProtocol conversion not. In all cases I tried, where IronPython uses BytesConversion on parameters, CPython does accept an arbitrary array as well:

 >>> b"spam".startswith(array.array('b', [ord('s'), ord('p')]))
True

Is the binding constraint right? It is supposed to constraint the binging to the argument that match the type exactly (I assume that LimitType means specialized type for generics). Ideally, the constraint would be more relaxed, matching any type that implements interface IBufferProtocol but I coudn't figure out how to define such constraint. Maybe constraining on the exact type match is more efficient in the average case.

Even with this change, things are not quite right. CPython will accept memoryview in all those instances, but IronPython not. Shouldn't MemoryView implement IBufferProtocol? (Or at least IList<byte>).

A side issue but caught my eye: ConversionBinder.cs, line 173, "blindly" converts a string to Bytes. This is error prone (only Latin 1 characters succeed) and it seems to me it is not a way to do it in Python 3, where all str to bytes conversions are explicit. See NewTypeMaker.cs, line 413: "[BytesConversionAttribute] to make enable automatic cast between .net IList and string." Really?

1. BytesConversionAttribute

The only thing the BytesConversionAttribute currently does is prevent PythonList from binding to IList<byte>.

OK, I understand now, but then maybe it is an opportunity to rethink/reorganize the mechanism. When I remove BytesConversionAttribute from a parameter, the binding to a Python list indeed happens, but soon fails with the same TypeError, though with a less informative error message:
With [BytesConversion]:
TypeError: expected IList[Byte], got list

Without [BytesConversion]:
TypeError: Specified cast is not valid.

In CPython (example):
TypeError: 'list' does not support the buffer interface

The type error still occurs because the Binder wraps PythonList, which implements IList<object>, in ListGenericWrapper<byte>, which was also the cause of problems for array bindings. So I think the better semantics of BytesConversionAttribute is probably not just prevent binding with PythonList but with any type if the type implements IList<object> and ListGenericWrapper would be needed.
But maybe the whole problem is stated backwards. I have scanned the whole codebase; there are 154 public interface functions that use an IList<byte> parameter. Of those, only 9 do not use [BytesConversion]:
IronPython.Runtime.ByteArray.__init__([NotNull]IList<byte> input)

IronPython.Runtime.Operations.DoubleOps.__new__(CodeContext context, PythonType cls, IList<byte> s)
IronPython.Runtime.Operations.SingleOps.__new__(CodeContext context, PythonType cls, IList<byte> s)
IronPython.Runtime.Operations.Int32Ops.__new__(CodeContext context, PythonType cls, IList<byte> s, int @base = 10)
IronPython.Runtime.Operations.BigIntegerOps.__new__(CodeContext context, PythonType cls, IList<byte> s, int @base = 10)

IronPython.Modules.PythonRegex.findall(CodeContext context, object pattern, IList<byte> @string, int flags = 0)
IronPython.Modules.PythonIOModule.IncrementalNewlineDecoder.decode(CodeContext context, [NotNull]IList<byte> input, bool final=false)
IronPython.Modules.PythonWindoundModule.PlaySound(CodeContext context, [NotNull] IList<byte> sound, int flags)
IronPython.Modules.PythonSocket.socket.recvfrom_into(IList<byte> buffer, int nbytes=0, int flags=0)

A cursory check shows that most of them should have been tagged with [BytesConversion] anyway. I believe that only the initializer of ByteArray legitimately should accept PythonList. If so, what about making a rule of never making PythonList (or better, IList<object>) match IList<byte> coded directly into the Binder, and for those very few cases (perhaps just one case...) when it is desired anyway, simply provide an overload? Then we can get away with BytesConversionAttribute altogether. Or better yet, rename and repurpose it, see point 3 below.
2. IBufferProtocol

The whole buffer protocol thing has been bugging me for a while. They should really be a zero-copy way of exposing the underlying memory instead of serializing the object.

I absolutely agree. I was having exactly the same thoughts. But I thought that we cannot use Span/Memory because it is not available in .NET 4.5/Mono? Anyway, this seems a more localized challenge. If we change the IBufferProtocol, then we could adapt the Binder accordingly, but at this stage I would like to figure out the principles of bytes conversion for the whole project.
3. BytesLikeAttribute
I like the name. CPython's documentation often talks about a "bytes-like" object as an acceptable input type. But on some occasion it talks about objects implementing a buffer protocol. It is being reflected in error messages as well:
>>> int([0x31])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: int() argument must be a string, a bytes-like object or a number, not 'list'
>>> codecs.latin_1_decode([0x31])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'list' does not support the buffer interface

I don't know if there is any difference between those two concepts, will have to dig deeper. But it appears that whenever Python API accepts a "bytes-like object" or an object with a "buffer interface", in IronPython, the parameter is tagged with BytesConversionAttibute. So if we agree to abolish this attribute, I would not just remove it but rename to BytesLikeAttribute and perform a specialized conversion in the expression tree generated by the Binder. Ideally without any copying. Maybe through Span<byte>/ReadOnlySpan<byte> or Memory<byte>/ReadOnlyMemory<byte>. I also like IReadOnlyList<byte>, which I think is under-utilized by the current code. However, I would not go with Span in function signatures. Span requires the underlying memory contiguous. IList does not, it simply offers indexed access. If a type provides Span/ReadOnlySpan but the interface requires IList/IReadOnlyList, maybe we can provide a ref struct wrapper type like ListGenericWrapper<byte> except type-safe. ListSpanWrapper<byte> perhaps?
So here are the options for the interface:
[BytesLike]IList<bytes>                           // if object must be modifiable
[BytesLike]IReadOnlyList<bytes>                   // my current favorite
[BytesLike,BufferProtocol]IList<bytes>            // in case buffer interface is something different than bytes-like
[BytesLike,BufferProtocol]IReadOnlyList<bytes>    // in case buffer interface is something different than bytes-like

Also, if a parameter is tagged with BytesLikeAttribute this would preclude wrapping in ListGenericWrapper<byte>. The binding has to succeed in a type safe way or there is no match. This will avoid several of those strange error messages while casting from object to byte.
And finally, maybe the overload resolver could produce a better error message in such case, something more in line with CPython, e.g. "expected bytes-like object, got xxx" rather "expected IList[byte], got xxx"?
4. Binding Constraint

Did you already resolve this? It seems like you're binding to any IBufferProtocol.

No I haven't solved it yet. I think I wasn't clear in my description of the issue. It is true that the proposed code will perform binding for all instances implementing IBufferProtocol. However, when a Call Site encounters the first case (say, an array) and invokes the Binder, the Binder will construct a binding expression tree (which will perform the conversion) and constrain ("restrict") it to only apply for other objects of the exact same type (i.e. another array). This binding is then stored in the Site cache. When another object later arrives at the same Call Site, and it is also array, the cache is hit, the binding will be reused, and the Binder is not employed. But if another type shows up that also implements IBufferProtocol, the cache will be missed and the Binder asked to create another expression tree, which will be exactly like the first one. This seemed to me like inefficiency: the first expression tree would have done just fine, and it was already in the cache.
But after thinking about it for a day I am now not so sure what is best; after all, there is a tradeof. If the first expression tree produced were restricted to apply to every object implementing IBufferProtocol, the cache would be smaller, the Binder would not be invoked several times, but the cost of checking the restriction would be higher. After all, it is simpler to check whether object's type is exactly a given type, than to check whether its type, or any of the base types implement a given interface. With this in mind, I put the question to rest now, it is not as important. And without performance measurements in various scenarios it is impossible to say which approach is better.
5. Memoryview

I've thought about having MemoryView implement IBufferProtocol. I'm not sure it's technically correct.

If implementing IBufferProtocol is not right, what about implementing IList<byte> and IReadOnlyList<byte>? Then binding would be trivial and automatic.
6. str to bytes conversion

These are probably left over from 2.7 and could be removed.

I will gladly remove this code at the first opportunity.

1. BytesConversionAttribute

what about making a rule of never making PythonList (or better, IList<object>) match IList<byte>

Preventing IList<object> from binding to IList<byte> is probably fine. I think the whole point of the wrappers is to make interop with .NET easier (e.g. passing [1,2,3] to a .NET method). However, since you would have to go out of your way to build a Python list with actual byte objects it seems unlikely to be beneficial. The only potential use case I can think of would be with array, but as you mention that doesn't even work (because values are converted back to Python types when extracted from the array).
2. IBufferProtocol

But I thought that we cannot use Span/Memory because it is not available in .NET 4.5/Mono?

We could include the System.Memory package. We wouldn't get all the overloads that .NET Core provides but it would enable us to use the types.
3. BytesLikeAttribute

But on some occasion it talks about objects implementing a buffer protocol.

CPython is somewhat inconsistent with their error messages. I think in most cases where they say "buffer protocol" they mean "bytes-like". I think it's somewhat cleaner in newer releases.

So if we agree to abolish this attribute, I would not just remove it but rename to BytesLikeAttribute

I am fine with renaming it.

Span requires the underlying memory contiguous. IList does not, it simply offers indexed access.

While this is true, if you look at Python's definition of bytes-like object they specifically mention contiguous memory.

I also like IReadOnlyList<byte>, which I think is under-utilized by the current code.

Because it didn't exist when the bulk of the codebase was written! :smile: I would be fine with making use of this since 4.5 is now the minimum target. Presumably Bytes and ByteArray would need to implement it.
[BytesLike]IList<bytes>                           // if object must be modifiable
[BytesLike]IReadOnlyList<bytes>                   // my current favorite

These seem good.
5. Memoryview

If implementing IBufferProtocol is not right, what about implementing IList and IReadOnlyList? Then binding would be trivial and automatic.

That would be an option. We could go further and implement it on all IBufferProtocol types. Then the whole binding issue becomes somewhat trivial and we no longer need special binding?

Anyway, it seems to me like IBufferProtocol should reflect the Py_buffer structure and so using Span/Memory appears to be reasonable.

if you look at Python's definition of bytes-like object they specifically mention contiguous memory.

So a bytes-like object has two constraints: implement buffer protocol and be a contiguous buffer. Great. This indeed makes Span/Memory qualify.

Anyway, it seems to me like IBufferProtocol should reflect the Py_buffer structure and so using Span/Memory appears to be reasonable.

I agree. Span/Memory allow the underlying data to be pinned thus allowing optimized acces in unsafe blocks. This lives up to the spirit of low-level, optimized memory access Py_Buffer provides. Although Py_Buffer need not be continuous and allows for fairly complex array layouts, these scenarios only become relevant when providing support to 3rd party libraries like NumPy and PIL. I am looking forward to implementing that, but we are not there yet, and for the builtin types supporting buffer protocol (bytes, bytearray, memoryview, array.array), a contiguous buffer will be enough.
I have realized that a ref struct cannot implement interfaces, or be members of non-ref structs, so the idea of providing a lightweight wrapper for a Span by the Binder to match an IList<byte> parameter is impossible. Conversely, it is impossible to convert an arbitrary IList<byte> object to a Span<byte> without copying data. So when making a choice for the interface type for IronPython's "bytes-like" parameter, it is either-or: one choice eliminates the other. It is a strategic choice with far-reaching consequences.
Below there are some thoughts I have on the choices I currently see. I evaluate them from the implementation point of view, and from the client point of view (e.g. C# host code calling into IronPython code).
A. IList<byte>/IReadOnlyList<byte>

Implementation: Most functions just loop over data and don't care whether the data is contiguous or not, so they are quite happy with IList. In fact, in most (all?) cases IReadOnlyList would do just fine. A notable exception are all decoding functions in _codecs: the actual decoding work is delegated to System.Text.Encoding.GetChars, and that interface not only requires a contiguous block but an actual byte[] array. The current code has an optimization to downcast the argument to byte[] or Bytes and access the underlying byte[], and only if that fails, a data copy is performed to a fresh array. This is good enough for most cases but probably should be changed/extended to go through IBufferProtocol to support more cases. This PR partially tried to address it.

Clients: Since IList is ubiquitous (e.g. every array implements it), it is easy for a client to provide data in this form. The exception is of course Span: it will require data copy to provide IList. If the data is available as Memory, things are a little easier: it is possible to provide a lightweight wrapper, automatically supplied by the Binder, to make a match.
Another thing is that IList does not derive from IReadOnlyList, as the latter came later on the scene. This means that there can be objects that implement IList but not IReadOnlyList. This does not apply to any standard .NET types: all of them that implement IList do also implement IReadOnlyList. Also we can make sure that this is so for all types in IronPython. For those unfortunate user types, an automatic lightweight wrapper provided by the Binder would do the trick.

B. Span<byte>/ReadOnlySpan<byte>

Implementation: Those simple functions that just iterate over data will be just happy with this efficient choice. Even more so: we have now a possibility to drop to unsafe code if performance optimization is required. However, the _codecs functions will have a big problem: I am convinced that it is impossible to obtain a reference to the original System.Array from Span, even if that span was created from a whole bytes[] array. This means that every call to those functions will result in data copy, although the input data is never modified during decoding. I don't think it is acceptable.

Clients: It is easy and cheap to get Span from System.Array, and the client can also span unmanned memory or a stackalloc. However, if the client has only a reference to IList and downcasting to bytes[] does not work, the only remedy is data copy. I find it a fair trade-off.

C. Memory<byte>/ReadOnlyMemory<byte>

Implementation: It is somewhat less performing than Span and the management can be a little more complicated, but not so in the simple cases, which are the most common. And the option of dropping to unsafe code if needed remains. However, although Memory can be boxed, it still does not allow to obtain a reference to the original array, even when created over the whole such array. At least I fail to figure out how. So the big memory/performance hit to codecs remains the same as for Span.

Clients: Again, byte[] will be easily accepted, but not IList (<= no guarantee of data contiguity) nor Span (<= cannot be boxed). So the clients will have to resort to data copy in those cases. From the client's perspective, Span would be better as it is trivial to convert Memory to Span.

D. IBufferProtocol

Implementation: We could make IBufferProtocol derive from both IList and IReadOnlyList and the simple functions can keep their IList parameter types. Or if the simple functions require Span, a method in IBufferProtocol will provide that, and the Binder will invoke it on demand, similarly to what this PR does. The codecs functions would use a method from IBufferProtocol to obtain bytes[]. A copy would only be made when absolutely unavoidable.

Clients: Obviously we will make all relevant IronPython types implement IBufferProtocol, but interoperability with native .NET types suffers. To support that, a sort of automatic Binder wrapper will be needed. Possibly several wrapper types, one for each .NET type we want to support: bytes[], Span<byte>, IList<byte>, IReadOnlyList<byte>. Or we disqualify the IList family on principle as the data is not guaranteed contiguous. Whether such wrapper is automatically created or not would be controlled by the presence of BytesLikeAttribute.

I am currently leaning towards Choice D with a mixin from B. The codec functions would have a parameter declared as [BytesLike]IBufferProtocol, with the semantics from Choice D. Simple functions like Bytes.startswith would declare their parameter as [BytesLike]Span<byte> or [BytesLike]ReadOnlySpan<byte>. The binder would create a relevant IBufferProtocol wrapper on the fly in the same way as for codecs but then immediately convert it to Span. If we disqualify IList<byte> as an acceptable bytes-like type, then this case becomes even simpler: bytes[] can be easily represented as Span<byte>. The only reason I am still floating IList around is because this is what IronPython 2 accepts, so accepting IList will make porting to IronPython3 easier. However I would prefer to drop support for IList as "bytes-like" altogether. Developers can easily convert their calls drom data to data.ToArray(), and although it copies data, it at least makes it visible to the developer. And maybe it will be a motivation to rethink their data types and replace IList with Span or byte[] or a downcast to byte[]. The latter two would be most beneficial for codecs.
@slozier, I am curious of your thoughts on this.

@BCSharp Thanks for the analysis!

However, the _codecs functions will have a big problem: I am convinced that it is impossible to obtain a reference to the original System.Array from Span, even if that span was created from a whole bytes[] array.

Why do we need a reference to the original array? If the concern is that methods like Encoding.GetString require arrays, then we could potentially resolve it by bumping the .NET Framework version to 4.6.1 (which is .NET Standard 2.0 "compatible") and using unsafe code.
unsafe {
    fixed (byte* bp = span.Slice(start)) {
        var z = e.GetString(bp, length);
    }
}

The binder would create a relevant IBufferProtocol wrapper on the fly in the same way as for codecs but then immediately convert it to Span.

This sounds like a good approach.

I would prefer to drop support for IList as "bytes-like" altogether

I agree. If you think about it, a Python list of bytes does not qualify as bytes-like so would would a .NET list of bytes work (although one could argue about the IList being strongly typed). There are enough differences between IronPython 2 and 3 that I think this one will be a minor pain point.

Before jumping all in we should do some small scale experiments. I think there are issues with using ref struct with the interpreter so using Span directly in public method signatures might be a non-starter.

we could potentially resolve it by bumping the .NET Framework version to 4.6.1 (which is .NET Standard 2.0 "compatible") and using unsafe code.

I like the idea of going though unsafe code in this case. Why bump up to .NET 4.6.1?
Default Encoding.GetString(byte*, ...) calls Encoding.GetChars(byte*, ...), which by default  will copy the unsafe bytes into a managed array and then call Encoding.GetChars(byte[], ...). So to avoid copying, all of our Encoding subclasses will have to implement unsafe GetChars(byte*, ...) override as the workhorse. We can mention this in the IronPython documentation to warn/guide host developers who want to implement their own Encoding. The standard .NET encodings are fine as they already use GetChars(byte*, ...) as the workhorse.

Before jumping all in we should do some small scale experiments.

Agreed. I will start with the experiments around encodings and make a draft pull requests if there is anything interesting to share/review.

I think there are issues with using ref struct with the interpreter so using Span directly in public method signatures might be a non-starter.

I cannot think of any issues. Do you have any (pointers to) information or examples  of those issues?
I know that Span cannot be created on the stack of async methods, but async methods can still create Memory and call other methods with Span parameters by accessing Memory.Span. It seems to me that Span and ReadOnlySpan are perfect types for public interfaces.

I like the idea of going though unsafe code in this case. Why bump up to .NET 4.6.1?

Pointer overloads were only added to Encoding in 4.6. I suggested 4.6.1 since I was thinking that we might as well target the .NET Standard 2.0 "compliant" version of the Framework. Thinking about it now, might be better to stick with 4.6 to avoid any potential "DLL hell" (if you build for 4.6.1 and reference System.Memory it'll bring in ~100 .NET Standard assemblies).

Do you have any (pointers to) information or examples of those issues?

https://github.com/IronLanguages/ironpython2/issues/347

Superseded by #765.


6play - no download possible

Checklist

[x] I'm reporting a broken site support
[x] I've verified that I'm running youtube-dl version 2019.10.29
[x] I've checked that all provided URLs are alive and playable in a browser
[x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[x] I've searched the bugtracker for similar issues including closed ones

Verbose log

youtube-dl -i -f best -o "/Users/couantcarine/Downloads/%(title)s %(upload_date)s.%(ext)s" --restrict-filenames https://www.6play.fr/objectif-top-chef-p_4454/semaine-1-journee-1-c_12538425 --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-i', u'-f', u'best', u'-o', u'/Users/couantcarine/Downloads/%(title)s %(upload_date)s.%(ext)s', u'--restrict-filenames', u'https://www.6play.fr/objectif-top-chef-p_4454/semaine-1-journee-1-c_12538425', u'--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.10.29
[debug] Python version 2.7.10 (CPython) - Darwin-17.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.1, ffprobe 4.1
[debug] Proxy map: {}
[6play] 12538425: Downloading JSON metadata
[6play] 12538425: Downloading webpage
[6play] 12538425: Downloading m3u8 information
WARNING: Failed to download m3u8 information: HTTP Error 404: Not Found
[6play] 12538425: Downloading MPD manifest
WARNING: Failed to download MPD manifest: HTTP Error 404: Not Found
[6play] 12538425: Downloading m3u8 information
WARNING: Failed to download m3u8 information: HTTP Error 404: Not Found
[6play] 12538425: Downloading MPD manifest
WARNING: Failed to download MPD manifest: HTTP Error 404: Not Found
[6play] 12538425: Downloading m3u8 information
WARNING: Failed to download m3u8 information: HTTP Error 404: Not Found
[6play] 12538425: Downloading MPD manifest
WARNING: Failed to download MPD manifest: HTTP Error 404: Not Found
ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 796, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/sixplay.py", line 113, in _real_extract
    self._sort_formats(formats)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 1327, in _sort_formats
    raise ExtractorError('No video formats found')
ExtractorError: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Description

All new shows or series of the 6Play site can't be downloaded

👍


IFTTT_CONNECTION_TIMEOUT_MS undefined

Just installed new version with timeout commited and has an error in debug window:
"ReferenceError: IFTTT_CONNECTION_TIMEOUT_MS is not defined"

P.S. You have a typo IFTT_ vs IFTTT_

Thanks for catching that! Fixed, committed, and published as 0.3.1


Design how to bootstrap a new distro/RID

We should design and document how to bootstrap .NET Core on a new distro and/or architecture.

Once we have this, we should look at retiring dotnet.bootstrap.py

Can this be closed? This is mostly covered by the new boostrap script: https://github.com/dotnet/source-build/blob/master/Documentation/boostrap-new-os.md. At least, I was able to use it for a new distro.

Yes.  This is covered by the boostrap script.  Closing.


Add ability to scroll Tile Palette with middle mouse button

At the moment it's laborious to select tiles of a large tileset inside the Tile Palette window.
Feature Request
Implement a way to scroll the tile palette vertical and horizontal with the middle mouse button.
Example (Tiled)

I have started looking at this issue. I might grab it, assuming no one else is clamoring for it!

@helle253 Great, it's all yours 👍 Let us know how it works out.

Ok, so the tile palette is now scrollable, similar to the above gif. I just had a 2 questions before I proceeded further.

Should the user be able to scroll while selecting
Should the user be able to expand the selection box after scrolling?

As is, the user cannot perform both actions at once, and trying to select after scrolling always resets the selection.
Both seem like potential use cases, although I think a stronger case could be made for the latter.

Hmm, good question. I like (1), because the restriction we'd add otherwise would be artificial - but selecting while scrolling always feels a bit floaty / imprecise. How exactly would (2) work?

i agree on # 1 - it’s certainly not ideal. i’m inclined to say no, because
it feels a bit sloppy to use. selecting with mouse and scrolling with
keyboard would feel fine, but doing on the mouse simultaneously feels not
good. figured i’d ask the question though.
regarding #2, i was thinking about it today, since i realized i didn’t
propose a way to do it. Presumably, i  would probably add a Shift modifier
to clicking. starting a new selection without the modifier would work as it
does now. shift-click would largely be the same, but without replacing the
previous ‘anchor’ point that is used to define the selection rectangle.
this may be outside of the scope of this issue though.
On Sat, Sep 29, 2018 at 10:00 Adam<EMAIL_ADDRESS>wrote:

Hmm, good question. I like (1), because the restriction we'd add otherwise
would be artificial - but selecting while scrolling always feels a bit
floaty / imprecise. How exactly would (2) work?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/AdamsLair/duality/issues/630#issuecomment-425651484,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQDL5de7ipuz5uKJgCR-aNRtxqDCj0doks5uf4segaJpZM4SkZut
.

--
Nathan Heller
Software Engineer
Abbott Labs
1 St Jude Medical Dr, St Paul, MN 55117
(715) 551-3074

regarding #2, i was thinking about it today, since i realized i didn’t
propose a way to do it. Presumably, i  would probably add a Shift modifier
to clicking. starting a new selection without the modifier would work as it
does now. shift-click would largely be the same, but without replacing the
previous ‘anchor’ point that is used to define the selection rectangle.
this may be outside of the scope of this issue though.

Sounds great, let's do it this way.

I've implemented it fully, just need to do some more testing before commit.
Adding the previously discussed shift modifier forced me to modify a few lines of existing code, so I want to make doubly that that doesn't cause any issues.

Closing this, as it was addressed in the linked PR.


jbutton transparent icon issue

this is brilliant and it helped me a lot. but one issue when I added this to my project is that the icons that use to be transparent png files now are not transparent.
at default swing, I just had opaque set to false and contentAreaFilled set to false so the background is transparent, somehow the jar file disabled this
is it possible to release a patch for that?
i fixed most of them by changing the background colour to the same colour as my background, but some buttons where i implemented a drop shadow in the background image is still giving me problems
 after including the jar
 at default swing
 the drop shadow problem i was talking about. all these are jbuttons

another rookie question: how do you utilise the fonts included or is it used by the components by default?

Hello @dis0hope ,
If the font means the font, it is used automatically, in this version of the jar the known font is used.
For the main question I can not help you because I find myself temporarily on vacation, but surely @atarw  will solve soon

@vincenzopalazzo thanks for responding, i guess i'll wait for @atarw then😁😁

Fixed!


Percent text color

Hi,
Is it possible to add a setter to PercentIndicatorView to get the TextView and set some colors/attrs?
public void setTextColor(int color) {    setTextColor(color); }
...
And ofc a setter in AnimatedCircleLoadingView ?
Or just a getter on percentIndicatorView ?
Thx,
Bastien.

Pull request added. Please check-it.
Thx,
Bastien.

Would be nice to have tint colors on the checked_mark and failure_mark!

Are u fixedd?

Added in version 1.1.3
Thanks @Siddounet


capstone instead of distorm3

Read it, http://www.capstone-engine.org/BHUSA2014-capstone.pdf
import distorm3
from capstone import *
from binascii import hexlify

print distorm3.Decode(0, "\x41", distorm3.Decode32Bits)

md = Cs(CS_ARCH_X86, CS_MODE_32)
for i in md.disasm("\x41", 0x00):
    `print [(i.address, i.size, (i.mnemonic+" "+i.op_str), hexlify(i.bytes))]

  //distorm3 :  [(0L, 1L, 'INC ECX', '41')]
  //capstone :  [(0L, 1, u'inc ecx', '41')]

Ref : https://github.com/aquynh/capstone
Ref : http://www.capstone-engine.org/lang_python.html

I am familiar with Capstone. I used diStorm3 as I only wanted to retrieve the size of instructions.

I implemented mine in Capstone. Good work, saw how you overcame some of the challenges I found too quite differently :)

I'm just open it for future works(arm,mips,sparc etc. maybe) consider it :)

vysec: Capstone, doesn't support labels, but it will give you the destination address of the jump instruction, but you can do it yourself as well easily. What I do then is create labels of my own. I put the disassembled instructions into array of objects and these objects have label parameters if needed. If I stumble upon a jump, I create a new label that I assign to this jump's destination and put also the jump destination label for that jump instruction. That allows me to be later independent from fixed addressing and I can then apply fixes to relative jump offsets as I know exactly to which instruction the jump should point to.
b3mb4m: Of course! Will change that in the future for sure.


Update BlueRobotics_MS5837_Library

@per1234 hi on Arduino library it has old version i want to update it with latest in old version it has ambiguious names d1 d2 which cause errors on some boards like Arduino nano, seeeduino nrf52 ble embed enabled

Thanks for the clarification. You can learn how to release a new version of the library with the fix for the ambiguous names from this section of the FAQ:
https://github.com/arduino/library-registry/blob/main/FAQ.md#how-can-i-publish-a-new-release-once-my-library-is-in-the-list
The Arduino Library Manager indexer system periodically checks each of the libraries in the index and picks up any new release/tag that meets the requirements listed here:
https://github.com/arduino/library-registry/blob/main/FAQ.md#what-are-the-requirements-for-publishing-new-releases-of-libraries-already-in-the-library-manager-list
This means there is no need to take any additional action in this repository to add new releases of your library to Library Manager. They will be added automagically!
It does take a little time for the indexer job to run, and then some additional time after that for the update to propagate through the CDN and the local cache. But it will get there. We give a conservative estimate of availability within one day's time.
You can monitor the indexing of the library releases by checking the library's dedicated indexer logs web page:
https://github.com/arduino/library-registry/blob/main/FAQ.md#user-content-can-i-check-on-library-releases-being-added-to-library-manager

So I will close this pull request as unnecessary.


Create generic function to perform login to page using Puppeteer

Most login pages just have username/email, password and submit button. We could write a function like Apify.utils.puppeteer.login() that would try to find these fields, fill them with provided values and then click submit or other button. It will not work all the time, but even 80% time is good enough. BTW browsers are also able to pre-fill login info, so maybe it's not that complicated after all.

Forms with inputs still seem to be the primary and most reliable implementation of logins relied on by browsers according to internet wisdom and source codes so the first iteration of this function should be able to cover a vast majority of logins using this approach and then we could try to reverse engineer the code from chromium for example to extend the functionality to the remaining edge cases.
sources:
https://dxr.mozilla.org/firefox/source/toolkit/components/passwordmgr/src/nsLoginManager.js#626
https://github.com/scrapy/loginform/blob/master/loginform.py
https://github.com/chromium/chromium/blob/master/components/password_manager/core/browser/form_parsing/form_parser.cc

I think we are limited to using solely puppeteer methods instead of evaluating elements from within the browser since conversion between JShandles and ElementHandles doesn't seem to be possible and we need an ElementHandle to be able to .type on it in order to avoid having to change the input values directly or dealing with keycodes which would likely not work due to:
https://stackoverflow.com/questions/13944835/how-to-simulate-typing-in-input-field-using-jquery
The closest thing I found resembling conversion JShandle -> ElementHandle was this:
https://github.com/GoogleChrome/puppeteer/issues/537#issuecomment-334918553


"Open in Terminal" does not focus new Terminal window when Ubuntu is running separately.

Windows Terminal version
1.18.3181.0
Windows build number
10.0.22631 N/A Build 22631
Other Software
No response
Steps to reproduce

Start Ubuntu in WSL.
Open an Explorer folder window. Right click any white space and select "Open in Terminal" from right click menu.

Expected Behavior
Terminal window opens on top of folder window and receives focus.
Actual Behavior
Terminal window opens behind folder window and does not receive focus. No keystrokes reach Terminal window until it is focused manually.
Related to closed but unresolved issue https://github.com/microsoft/terminal/issues/6611

@carlos-zamora I think we have a more recent "terminal doesn't come to the foreground" bug report


js to external cdn

We are hosting our Next.js application on AWS and would typically deploy the javascript assets to to an external CDN while still keeping the universal rendering intact. Does this make sense with a Next.js application?
 Is it just app.js?

Tracking this here: https://github.com/zeit/next.js/issues/2053
However, you could use this: https://github.com/zeit/next.js#cdn-support-with-asset-prefix
With the CDN's origin support. Basically, the CDN will fetch the file from the actual site for the very first time.

Thanks for the quick response! I understand the asset prefix and plan on using it. The part that confuses me is WHAT to deploy to the cdn, everything in '.next'? just app.js? something else?
Thanks!

@davegomez you don't need to upload anything.
Check this: https://aws.amazon.com/blogs/aws/amazon-cloudfront-support-for-custom-origins/

Thats awesome, but it may not be an option for me, I don't have final say on all deployment details. So if I am required to push to S3, what do I need to push?

For that you need to wait until #2053

ok, thanks!


Hide the translate tab for people who don't have access to translate …

…any entity.
Only staff members with the role [editor, admin, creative team, global admin] will have access to the translate tab
Fixes #5191

:+1:


feat(batch): Initial Batch sample

I'm opening this PR to get feedback on style early. I need to write 5 more samples for Batch, so I want to figure it out before I have to edit 5 of these for any changes.
This is meant to be a close translation of https://github.com/googleapis/python-batch/pull/22 and https://github.com/GoogleCloudPlatform/nodejs-docs-samples/pull/2775
I've experimented with initializing entire structs at once instead of using new(SomeType) and then assigning fields, but it caused rather unpleasant rightward drift:
https://github.com/GoogleCloudPlatform/golang-samples/blob/205b9e49a31d0594da19eda9b6077519d25445aa/batch/create_with_script_no_mounting.go
TODO:

[ ] Write the rest of the samples once the style is settled
[ ] Add tests

@Shnatsel The rightward drift actually looks better to me. To handle the long lines, we can pull out child variables for things like TaskGroup and AllocationPolicy. Using new and building a structure piece by piece is actually less common in Go.
Would you mind updating with the suggestion above and we can polish this together?

I've split the megastructure construction into a bunch of smaller structures, still constructed by value instead of via field assignment, as you have suggested.
I think this is more readable than either of the previous layouts.
Is there anything else I should change, or am I good to go to I start working on the other 5 samples?

@Shnatsel when you're ready for another pass, just re-request a review above.

@enocom I'm done adding samples, and I've covered all of them by test. I'd appreciate another look so I could merge this. Thanks!


docs: Remove API playground links

@vikram-dagger  I think we also need to remove this from the gql.md files, correct?
i.e:
https://github.com/dagger/dagger/blob/main/docs/docs-graphql/data/examples/queries/git/gql.md
https://github.com/dagger/dagger/blob/main/docs/docs-graphql/data/examples/queries/defaultPlatform/gql.md
^ there's more files like this in the repo.

LGTM


What is the purpose of the opendrive_adapter.cc file located in modules/map/hdmap/adapter?

Is it used to convert files written in the standard opendrive format to the apollo opendrive format? If not, are there any other scripts that do this?
Best regards

Opendrive Adapter is used to convert  Apollo Opendrive format into Apollo internal application format. there is no script to convert standard Opendrive format to the apollo Opendrive format now.

Thank you!


Added proper logging

Improvements and features:

Added Python logger setup
Added switch --log-level
Added switch --log-file
Separated retrieving data from DTU via M-bus and MQTT publishing with separate exception handling
Added handling for Ctrl-C keypress to stop execution

Sorry that it took so long, issues with CI/CD and hoymiles_modus had to be resolved before this. Codecov is still failing but I will address it later.


feat(client): ✨ redirect users on *.firebaseapp.com to *.web.app

https://cat-me-if-you-can-game-dev.firebaseapp.com/ also links to our app this PR will redirect all users from https://cat-me-if-you-can-game-dev.firebaseapp.com/ to https://cat-me-if-you-can-game-dev.web.app/

tested on dev and seams to be working


I created a .net copy based on SkiaSharp

Excellent work! ♥♥♥♥♥♥♥
I translated to C# 😄
https://github.com/taurenshaman/veins.skiasharp/blob/master/Veins.SkiaSharp/Veins.Art/HashImage/Robohash.cs

Very cool, I hope it was fun :)
A word of warning, Livings/GeometricBird doesn't have a posted license so you may not be allowed to distribute it.

Thank you very much!
I added a License-Robohash file.


Can the event subscription be created separately?

Hi,
Can you please confirm if the EG event subscription can be created outside the ADF - either via CLI or terraform?
If so, what are the webhook details?
I wanted to check if the creation is possible via terraform, which allows me to setup dead-lettering and other event grid subscription specific settings.
Thanks,
Preetham

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

ID: 85fbaf6b-c3f8-6992-c1a6-d3ceefc20039
Version Independent ID: 9faba9cf-830c-4c38-004b-291abe5850d7
Content: Create custom event triggers in Azure Data Factory - Azure Data Factory
Content Source: articles/data-factory/how-to-create-custom-event-trigger.md
Service: data-factory
Sub-service: orchestration
GitHub Login: @chez-charlie
Microsoft Alias: chez

@preethamrajk
Thanks for your feedback! We will investigate and update as appropriate.

@preethamrajk  Since this issue is not related directly to the doc, I would recommend you to create a thread on the forums - Microsoft Q&A or Stack Overflow
Once you post your issue on forums, it will have visibility across the community which is a better suited audience for such types of issues.


Incorporate testing

As per the assessment by @osandvold302 , we are going to incorporate testing using the Jest framework. Once we have some basic testing in place, she will merge this into devel and we will discuss goals for code coverage, code reorganization, etc.

This is complete with commit# d6d5dff1934f44fd8d98694e8ef9fd217125bc40


Minor changes on send feedback dialog

:pushpin: References

Issue: https://app.clickup.com/t/865ch812x

:memo: Implementation
Added message on "Send Feedback" dialog and made it a bit wider. Also added the last data-update.
:art: Screenshots

@adrianq There are a lot of PDB-Redo links not working...


[Google drive]

Description
Hey guys,
Can you please add multiple volumes drives in Google Drive root path? We have one at the moment, but I would like to multliple account in order to index them.
Thank you

Who will benefit from this feature?
No response
Anything else?
No response

Could you open an extension issue instead of an API issue? https://github.com/raycast/extensions/issues/new?assignees=&labels=extension%2Cfeature+request&template=extension_feature_request.yml&title=[Extension+Name]+...


Investigate sudden drop in coverage

Before #846 we were at ~89 % coverage, and after #884 we are at ~71 % coverage. How did this happen? What are we measuring differently?
https://codecov.io/github/poliastro/poliastro?branch=master
Perhaps the tests were included in the source coverage? If 71 % is the real number, then we have a lot of work to do.

Before: https://codecov.io/gh/poliastro/poliastro/tree/1563d4671f529519150dcc048066511883294b3e/src/poliastro
After: https://codecov.io/gh/poliastro/poliastro/tree/e7be2537e0a00f9cd7327bddc228e729d82005a7/src/poliastro

I suspect we're running coverage checks without disabling Numba.

No we aren't! Or at least, we're trying.
https://github.com/poliastro/poliastro/blob/93042f5a3c2b43ab5c55ba7ba3eacb1e6dbb0799/azure-pipelines.yml#L74


Metamask Extension Not Opening in Separate Tab

After running export SECRET_WORDS=some-secret-words; export RPC_URL=https:\/\/kovan.infura.io\/v3\/9aa3d95b3bc440fa88ea12eaa4456161; export CHAIN_ID=42; npx synpress run -b firefox
The resulting cypress instance not have MetaMask setup open in a separate tab, I am not sure what caused this to happen as it was setting up properly previously.

Hey @raparri01,
Thanks for reporting this issue. Firefox is not yet supported.
To run it on Chrome, you can try:
SECRET_WORDS='word1, word2, ...' RPC_URL='https://kovan.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161' CHAIN_ID=42 npx synpress run

Thanks @drptbl this got it working again


Cannot install sfdx-diff plugin

Summary
I'm installing sfdx-diff extension following this link , seems it cannot  be installed but without any error message as below:
C:\Users\userName>sfdx plugins:install @salesforce/sfdx-diff --verbose
This plugin is not digitally signed and its authenticity cannot be verified. Continue installation y/n?: y
Finished digital signature check.
C:\Users\userName\AppData\Local\sfdx: C:\Users\userName\AppData\Local\sfdx\client\7.14.0-bd96f098e0\node_modules\yarn\bin\yarn.js add @salesforce/sfdx-diff@latest --non-interactive --mutex=file:C:\Users\userName\AppData\Local\sfdx\yarn.lock --preferred-cache-folder=C:\Users\userName\AppData\Local\sfdx\yarn --check-files --verbose
Installing plugin @salesforce/sfdx-diff... -
C:\Users\userName>sfdx plugins
no plugins installed
Expected result
The plugin can be installed or give some error
Actual result
plugin is not installed, nor error message
Additional information
Feel free to attach a screenshot.
VS Code Version:
Version: 1.40.2 (user setup)
Commit: f359dd69833dd8800b54d458f6d37ab7c78df520
Date: 2019-11-25T14:54:45.096Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.17763
SFDX CLI Version:
sfdx-cli/7.14.0-bd96f098e0 win32-x64 node-v10.15.3
OS and version:
Windows 10

@gtiancai transferring this issue to the CLI repository since the problem appears to be installing plugins in general.

@brpowell Thanks Bryan!

@gtiancai it looks like you might be on an older version of the CLI can you update your CLI and then try again? We migrated the CLI to a new CLI framework (OCLIF) early this year and therefore any plug-ins created after the migration will be OCLIF and not work on pre-OCLIF CLI versions


Key Error: Receive Deliver - Expiration on Options

Hi,
I encountered a "KeyError" when processing an expiration on an option.
Traceback:

Fields in the transaction-csv
transactions.csv
As a workaround i deleted those lines and ran the program again.
Now it tells me I still have open positions (I have none), but at least the tax income statement gets created correct:

Your CSV transactions should be complete. Your example data shows expiration of options, but you have not
bought or sold any options before. The current code should be fairly good tested with short options, so if
this issue is not resolved by using the complete list of transactions, then you might use long options? (Then
please submit a complete use case for that setup.)
Also the list of open positions should be looked at in detail to check for missing transactions.
(I have seen reports that downloading more than 250 transactions might truncate them. ???)
best regards,
Florian La Roche

Hi, thanks for your fast reply.
transaction_history.csv
Here is the complete list of transactions.
With this list i get the KeyError shown above.
They are mostly long options (3 of 4 options are long options) and the report contains less than 250 transactions.
The very first removed option (GOEV on 1/21/22) was bought in 2021. I guess here i need to manually add the transaction from 2021 into the CSV-file, correct?

Correct, add the rabnsactions from 2021 with a normal text editor to the end of the file.
(Using a spreadsheet program, the lines are often modified.)
If you combine several transaction files, you have to delete the first line of the files except for the newest date.
Does this work for you now?
best regards from Germany/Stuttgart,
Florian La Roche

I exported all trades, so no trade which was done in the year before is missing.
Now everything works fine and I get no errors.
Thank you for the fast reply and solution!

Thank you, this was useful to me. Maybe worth it to have in a FAQ.


Skipping envs

Great stuff, thanks. Is there a reason you're skipping some environment variables in directory export and shell file export and not json https://github.com/phusion/baseimage-docker/blob/master/image/bin/my_init#L75-L87 ?

The shell export file works by directly setting environment variables inside the shell. But HOME, USER, GROUP etc are special environment variables that are used by the shell, or by programs typically invoked from the shell. They're user-specific environment variables that are set by PAM, sudo, etc. As such, we needs to make sure we're not overriding them.
We do not exclude these environment variables from the JSON export because we can assume that programs that load the JSON do not blindly set them as environment variables, as the shell does.


As a user, I would like the ability to click edit from the confirmation page, go back to make a change in the screener, and not have to click through the rest of the screener again to get back to the confirmation page

On confirmation page:

Click edit button
Go edit whatever you're editing
When you hit continue, it lands you back on confirmation page

@sydney-devine @CalebPena This functionality is working.


Assigning multiple proxies for a rule

Thanks for the useful program, this is very cool!
Is it possible to configure multiple proxies for a route? Maybe something like
bridge -b :8080 -p - -p socks5://server1:1080,socks5://server2:1080,socks5://server3:1080
where it would be either random or round-robin.
There are actually several use-cases I could see here, from geo-based endpoint monitoring to load-balancing when using multi-slot downloaders like axel.

This already has a round-robin, use '|' instead of ','
bridge -b :8080 -p - -p 'socks5://server1:1080|socks5://server2:1080|socks5://server3:1080'

Greatly appreciated, thank you for the response!