Add support for Aria2 RPC

There are several reports about the download speed would slow down gradually, especially in Bilibili:
https://github.com/iawia002/annie/issues/275 https://github.com/iawia002/annie/issues/143 https://github.com/iawia002/annie/issues/128
I am not an expert in Go and have no idea to improve the application itself. So I tried to use third-party applications to download.
aria2 is a very famous and lightweight command-line download utility. It has an interface of RPC, which means we can merely send a request to make it work.
  -aria2
    	Use Aria2 RPC to download
  -aria2addr string
    	Aria2 Address (default "localhost:6800")
  -aria2method string
    	Aria2 Method (default "http")
  -aria2token string
    	Aria2 RPC Token

Here is the demo:

Use built-in download:

Use aria2c (I use a WebUI, AriaNg to watch the speed):

I know that this breaks the independence of annie, but it is an effective workaround to improve the download speed. In addition, I only implemented the download request, leaving the post process empty. Perhaps I would make the function more completed some day or just make it a plugin for annie.
Last but not least, thank you for developing this convenient tool.

Thanks for this! I will do some documentation and format related work tomorrow night, and then I will draft a new version.

I have saw the code about download.
I find that when download paylist video, there are downloaed one by one, not concurrent.
I wonder why not change it to conconcurrent?
If i modify it to concurrent, something (may be bug) will occure?


RFC: Stale to be "true" if any background fetching is happening

Summary
Stale to be "true" if any background fetching is happening
Proposed Solution
Hey!
First of all, thanks for the awesome library. Currently, I lead a team that migrates big application from Apollo to urql, and I have very high hopes that this is a correct decision.
Most of our needs are covered by what urql has to offer at the moment, except for one. Comparing to Apollo, urql provides very limited information about current state of the rendered query (e.g. networkStatus). I've carefully read reasoning in this thread, and can definitely see the logic in an overall strategy, however few details are messing the whole picture for me right now.
Our app mostly consists of different tables with data. User can view them, and modify / delete any row using dropdown menu. When that happens, we run delete mutation, invalidate deleted entity in the cache using cache.invalidate in updater, and wait for query that populates the table to be refetched.
Unfortunately, I have not found a way to us to know if that query is refetched. You may suggest for us to not only invalidate an entity, but also update query result in cache manually, but in our case we can't make that due to side-effects on delete. The easiest & safest way would to just show kind of "Syncing..." status in the table until data is freshly fetched.
Same goes for cases when variables change. Often we have a header in the table with range picker or toggles that modify query variables. Query can take few seconds to resolve after change, and whole this time users has no visual feedback to their actions.
I think it can be handled (probably) by custom hooks, maybe exchanges and stuff like that... But from what I see now, this library aims to become a real competitor for Apollo. However, in my opinion, it will not happen until such fundamental functionality has to be hacked around (sorry if I sound rude).
Requirements
I agree that fetching flag should only be responsible for explicitly called action.
So it will be only logical that stale flag should indicate staleness of the data - which is by dictionary definition stale in case query variables change or data becomes invalidated in the cache manually. That way, it would be explicit & straightforward - you will always know if the query is being refetched if you need that info, if no - you just use fetching.

I think you're completely right. While there are ways to work around this there are also cases where none of the Client/exchanges pipeline took responsibility for emitting a stale flagged result which leads to inconsistencies.
I've got an initial PR up that aims to get this fixed

Thanks for such quick response and implementation!

This will always cause the bindings to set fetching: true.

For some reason I didn't think to check that. You are completely right.

... but urql is not copying approaches here from either Relay or Apollo but we approach every problem from first principles.

That's a really good approach, and I think that's exactly what makes you better - an opportunity to see what's working best and what doesn't, and make a right decision.
Wish you best luck.

@kmrachko On a side note, this change has been merged and much more trivial than expected. So you'll see it go out today (if all goes well) as part of a much larger release batch.

Alright, this has indeed gone out with the release batch today. Let me know if you have any further questions about this! 🙌 I'll leave another note on the other RFC


Added debug assertions checking slice lengths

Implemented checks to ensure slice arguments have a valid length, both non-zero and (when applicable) matching the length of some other input. These assertions are only active in debug mode, and will not exist in release mode.
To-do:

[ ] Determine what version number to use (I believe this should be a major version bump, since it is technically not backwards-compatible)
[x] Update documentation to reflect the possible panic conditions in debug mode, and the corresponding pitfalls in release mode
[ ] pre-commit is not working on my end yet - can someone else please manually run it while I get it sorted out on my machine?

Closing in favor of #16


flip release version to 0.9.0

@i8run   merging it directly , as it's quite straightforward and I did comparison with other  similar PRS


BSD tcp socket - send error with large data size

Hi,
I use Thread X with RA6M3 (Cortex M4).
FSP version 5.3
I want to send via tcp 119k byte using BSD wrapper, but:
If i try to send with a single call to send() function i get an error.
bytes_to_send = 118784;

status = send(accepted_socket, ((const char*)p_SCmos), bytes_to_send, 0);

I thought it was a problem with the number of packet pool and their size but even setting the size to 1568 with 32 packets even trying to send only 15k bytes at a time I get an error.
The only wait to make it to go is to split with small send().
#define MAX_ONE_TIME_SEND_BYTES 1500
       while(remaining_bytes > 0){
           if(remaining_bytes > MAX_ONE_TIME_SEND_BYTES){
               bytes_to_send = MAX_ONE_TIME_SEND_BYTES;
           } else {
               bytes_to_send = remaining_bytes;
           }
           status = send(accepted_socket, ((const char*)p_SCmos + (118784 - remaining_bytes)), bytes_to_send, 0); //bytes to send= 118784
           if(status == -1){
               SetLed(RED);
               D(printf("Error sending body GetRawImage!\n"));
           }
           remaining_bytes -= status;
           bytes_SENT += status;
           n_send++;

           D(printf("BYTES SENT: %d, SEND_NUM = %d\n", status, n_send));
       }

What is the connection with  the BSD send() and packet pools?
I thought that BSD send() took care of dividing my data to send it and not having to do it myself. (BSD should take care of this itself, If it can't send all the bytes it should send only those it can but not get an error)
The only limit i think may be space due to the number of packets * packet size, but even if i use 1568 * 32 = 50176 a send with only 15k at a time it should work but it doesn't.
Can you explain to me why?
I think it's a bug, can you check?
Thanks

Hi @Hnz2,
No, I haven't defined NX_DISABLE_PACKET_CHAIN.
Alex

Hi @ATrocan,
OK. Unfortunately I don't have time to deeply debug this issue. Please wait for hints from other users.
btw ... I saw already that you discussed this topic at Renesas community forum here.
Jan

Yes, you’re right, but they told me things I had already guessed. Nothing new.
The behavior is unpredictable, and this worries me and my work colleagues.
The BSD wrapper should behave in a certain way, but it doesn’t, so we wanted to ask for a check to see if it might be a bug.
Thanks for your replies. @Hnz2
Alex

Hi @ATrocan,
Do you use separate packet pool for TX of your TCP socket or do you share packet pool with other sockets or even RX? Maybe you can check how looks your TX packet pool via packet pool property nx_packet_pool_available. Sharing packet pool may to introduce some unpredictability. Also make sure that your IP instance have higher priority (lower number) that your task handling TCP socket.
Jan

Hi @Hnz2,
Yes, I use a dedicated packet pool only for my tcp socket.
Configuration:
packet pool for tcp = 32 packets * 1568 bytes
IP Helper Thread Priority = 1
BSD internal thread priority = 2
My Thread handling tcp socket priority = 3
My output is after asking in loop for the image to receive(118784 bytes):
SONO DENTRO IL WHILE (secondo read_next_bytes_count)
Message received: GetRawImage
COMANDO GetRawImage Rilevato
Image capture Successful
BYTES SENT: 40000, SEND_NUM = 1
BYTES SENT: 40000, SEND_NUM = 2
BYTES SENT: 38784, SEND_NUM = 3
---> BYTES SENT: 118784 in 3 send()
SONO DENTRO IL WHILE (primo read_next_bytes_count)
Message received: 000011:
bodyLen: 11
SONO DENTRO IL WHILE (secondo read_next_bytes_count)
Message received: GetRawImage
COMANDO GetRawImage Rilevato
Image capture Successful
BYTES SENT: 40000, SEND_NUM = 1
BYTES SENT: 40000, SEND_NUM = 2
BYTES SENT: 38784, SEND_NUM = 3
---> BYTES SENT: 118784 in 3 send()
SONO DENTRO IL WHILE (primo read_next_bytes_count)
Message received: 000011:
bodyLen: 11
SONO DENTRO IL WHILE (secondo read_next_bytes_count)
Message received: GetRawImage
COMANDO GetRawImage Rilevato
Image capture Successful
BYTES SENT: 40000, SEND_NUM = 1
Error sending body GetRawImage!
errno = 22

As you can see on the 3th send fails, this is the unreliability I was talking about. why did it work the first 2 times and then not?
Sometimes it fails directly from the first send, sometimes from the second and so on.
Thanks
Alex

Hi @ATrocan,
Hard to say what is going on at your case (I never used BSD wrapper at NetX Duo). I used BSD sockets at my previous project, but I ported my code into native NetX APIs, because these APIs are much more flexible than BSD and allow to save tons of memory.
Maybe you can check nx_packet_pool_available and nx_packet_pool_total. I think you have exhausted packet pool when sending failed.
Jan

Hi @Hnz2 ,
yes, you might be right but it's strange because after each send all packets are released... so they should all be available again.
I don't know, anyway thanks for your help.
Alex

@ATrocan It is possible that your packet pool needs to be much bigger than 32 packets.  The BSD layer creates a chain of packets to store the original frame of 119K of data and then passes the chain to the TCP layer.  TCP layer attempts to fragment the 119K data into MSS size (assume it is 1460 bytes) and sends each segment to the IP and MAC layer for transmission.  Assuming each packet is 1536 bytes, in the worst case you are looking at 158 packets to transmit the 119K payload.

@ATrocan Not quite... Transmitted TCP frames are queued in the socket, in case the frame needs to be re-transmitted.  The frame is released only after an ACK covers the entire frame.

Hi @Hnz2 , yes, you might be right but it's strange because after each send all packets are released... so they should all be available again. I don't know, anyway thanks for your help.
Alex


Link element(or Link block) , I cant find how/where to set href

Hi @artf  can you please have a minute to look at this issue.
Problem : i cant set the href for news letter preset
Steps to reproduce:
Please follow the steps:

go to the demo http://grapesjs.com/demo-newsletter-editor.html of newsletter preset.
try add link element block
click on it and try to set or change the link , ! just dimension/Typography/Decorations

Regards

You can find them in settings panel


GH-35260: [R] Add s3_init helper for adjusting log level

What changes are included in this PR?
Adds a non-exported helper function, s3_init, that lets users optionally control the log level of the AWS C++ SDK as well as the number of threads it uses for its I/O event loop. This brings R's functionality into alignment with PyArrow.
Are these changes tested?
Tests are included just to cover input validation and I've manually tested the code locally to make sure it's working as expected.
Are there any user-facing changes?
This function is not currently exported but we can discuss this. I'm thinking it probably should be and that it should be linked from within the documentation so users can find it.

Closes: #35260

Thanks for taking a look @thisisnic.

I'm a little bit hesitant about using a function that sets state in a session in this way; there's something which feels a little unidiomatic.

Yeah I agree, esp about it not feeling idiomatic, though I think it's hard to avoid due to how the AWS C++ SDK is designed. Reading https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/basic-use.html, it looks like any session should init the API once, which is the point where the application specifies the log level it desires for the remainder of the session. I think we could totally do something with options as you suggest but it would make it easier for the user to run into this scenario:
options(arrow.s3_log_level = "fatal")
s3_bucket() # Indirectly causes initialization of the API with log level set to Fatal
options(arrow.s3_log_level = "debug") # <---- Has no effect, log level stays set to Fatal

With the implementation in this PR, the user would instead get an error:
> arrow:::s3_init(log_level = "debug")
Error: Invalid: S3 was already initialized.  It is safe to use but the options passed in this call have been ignored.

Actually, was this always intended to be an internal function (as I see it's not been exported), or was the @export tag missed?

I left it unexported just until it was discussed in review and since I wasn't sure. I'm leaning towards export but am curious what you think.

It would make it easier for the user to run into this scenario:

options(arrow.s3_log_level = "fatal")
s3_bucket() # Indirectly causes initialization of the API with log level set to Fatal
options(arrow.s3_log_level = "debug") # <---- Has no effect, log level stays set to Fatal

With the implementation in this PR, the user would instead get an error:
> arrow:::s3_init(log_level = "debug")
Error: Invalid: S3 was already initialized.  It is safe to use but the options passed in this call have been ignored.

Ah, that's a shame; I agree that the silent swallowing of errors isn't great.  Would it be any better if we called s3_init() inside s3_bucket() instead, and rather than using the options above, we update the signature of s3_bucket() to take a new parameter, log_level to define the value, or would we still run into the same problem?

I left it unexported just until it was discussed in review and since I wasn't sure. I'm leaning towards export but am curious what you think.

I feel like it'd be helpful to expose this functionality to (advanced) end users, but it's still unclear how best to do this in a way which would be consistent with their expectations for how this would work. It's tricky!

...would we still run into the same problem?

I think we would still have this issue:
s3_bucket("my-buk", log_level = "fatal")
s3_bucket("my-buk", log_level = "debug") # Doesn't do what user expects because S3 is already init'd

We could issue a helpful warning here, though we could also do that with the proposed s3_init function too.
@paleolimbot thank you for spitballing! I think see where you're going but I think we could avoid keeping state in the R side and just wrap arrow::fs::IsS3Initialized().
I think the crux of the problem is that the AWS C++ SDK is forcing us to have immutable state and IMO is that isn't a common pattern in R. It might be possible make this state mutable by re-initializing the SDK on the user's behalf when we detect we need to (e.g. the user changes the log level after s3_bucket() but before bucket$ls() ) but that feels clunky and I'm not sure how well it'd work. I think shutting down the API (arrow::fs::FinalizeS3()) involves blocking until all SDK resources (e.g., threads) are free'd up.
I might do a bit of searching around to see if there are other packages that deal with this kind of situation. If we ultimately don't find something we like, I'd be fine closing this PR and saving it for another time.

We could issue a helpful warning here

IMO, that would be plenty here.

Okay, I'll refactor and ping you when it's ready for another look. Thanks @thisisnic !

Hey @thisisnic, this is ready for another look. With this refactor, you can turn logging on either by:
s3_bucket("my_bucket", log_level = "debug")
# or
S3FileSystem$create(log_level = "debug")

And doing either a second time with log_level set issues a warning:

Warning message:
S3 is already initialized. Argument 'log_level' ignored.

But calling s3_bucket/S3FileSystem$create w/o log_level set repeatedly does not and the initially set log_level is retained.

Thanks for the reviews @thisisnic and @paleolimbot. Now that we've reviewed two different implementations of this, is one a clear winner? I'm in favor of having a standalone s3_init that the user calls out of band of any S3 function calls which produces an error if it's called multiple times in a session. I think I'm also in favor of not exporting it at this time, and we can always choose to export it later on if we find we like it enough.

I had another thought about how to do something idiomatic while not confusing users: What about just having an environment variable like ARROW_S3_LOG_LEVEL that all C++-based implementations could make use of? So whenever S3 initialization happens on the C++ side, the env var is checked and the log level is set accordingly.

It does, though how it works is a bit odd: #35575 due to how the Python imports are structured. It Though it is currently more to similar to an s3_init helper from R.

@amoeba - should I close this PR if you're going with #36115 instead?

Yep! Closing in favor of approach outlined in https://github.com/apache/arrow/issues/36115.
Thanks @thisisnic and @paleolimbot for the review on this one.


WIP: Add AwsCrtHttpClient integration

Description

WIP: Add AwsCrtHttpClient integration
Motivation and Context

AwsCrtHttpClient is maintained by AWS.
Testing

None
Screenshots (if appropriate)
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)

Checklist

[ ] I have read the CONTRIBUTING document
[ ] Local run of mvn install succeeds
[ ] My code follows the code style of this project
[ ] My change requires a change to the Javadoc documentation
[ ] I have updated the Javadoc documentation accordingly
[ ] I have read the README document
[ ] I have added tests to cover my changes
[ ] All new and existing tests passed
[ ] A short description of the change has been added to the CHANGELOG
[ ] My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

[ ] I confirm that this pull request can be released under the Apache 2 license

Codecov Report

Merging #1 into master will decrease coverage by 0.21%.
The diff coverage is 0%.

@@             Coverage Diff              @@
##             master       #1      +/-   ##
============================================
- Coverage     70.16%   69.94%   -0.22%
  Complexity      188      188
============================================
  Files           776      782       +6
  Lines         24129    24146      +17
  Branches       1799     1800       +1
============================================
- Hits          16929    16888      -41
- Misses         6416     6471      +55
- Partials        784      787       +3

Flag
Coverage Δ
Complexity Δ

#unittests
69.94% <0%> (-0.22%)
188 <0> (ø)

Impacted Files
Coverage Δ
Complexity Δ

...rt/internal/AwsCrtAsyncRequestResponseAdapter.java
0% <0%> (ø)
0 <0> (?)

...azon/awssdk/http/crt/internal/ByteBufferUtils.java
0% <0%> (ø)
0 <0> (?)

.../amazon/awssdk/http/crt/AwsCrtAsyncHttpClient.java
0% <0%> (ø)
0 <0> (?)

...p/crt/internal/AwsCrtResponseBodySubscription.java
0% <0%> (ø)
0 <0> (?)

...http/crt/internal/AwsCrtResponseBodyPublisher.java
0% <0%> (ø)
0 <0> (?)

...http/crt/internal/AwsCrtRequestBodySubscriber.java
0% <0%> (ø)
0 <0> (?)

...nio/netty/internal/OldConnectionReaperHandler.java
81.81% <0%> (-9.1%)
0% <0%> (ø)

...awssdk/codegen/poet/client/specs/ProtocolSpec.java
77.41% <0%> (-3.14%)
0% <0%> (ø)

...mazon/awssdk/core/internal/retry/RetryHandler.java
88.63% <0%> (-2.28%)
0% <0%> (ø)

...ery/internal/marshall/QueryMarshallerRegistry.java
77.77% <0%> (-2.23%)
0% <0%> (ø)

... and 38 more

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 2e62d0b...870889f. Read the comment docs.


Update jansi to 2.3.4

Updates org.fusesource.jansi:jansi from 2.3.3 to 2.3.4.
Changelog
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Files still referring to the old version number
The following files still refer to the old version number (2.3.3).
You might want to review and update them manually.
daffodil-core/src/main/scala/org/apache/daffodil/grammar/ElementBaseGrammarMixin.scala

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.fusesource.jansi", artifactId = "jansi" } ]

labels: library-update, semver-patch, old-version-remains

+1

[X] Do all automated continuous integration checks pass?
Yes
[X] Is the update a patch, minor, or major update?
Patch update. Small bug fixes that don't affect Daffodil
[X] Is the license still compatible with ASF License Policy?
Yes, still Apache 2.0.
[X] Have any changes been made to LICENSE/NOTICE files that need to be incorporated?
No changes.
[X] Have any transitive dependencies been added or changed?
No transitive dependencies.


Hello my friend. Thanks.

My friend, I have been following you for a long time.
Instagram : @selimpsart :)))
I wish you continued success. You use masking very well. I also wonder where you discovered these prompts.
Are you planning to publish a tutorial on using multiple masks?
I think you should open a YouTube channel.
Of course, it is a serious time-consuming task.
Thank you again.
Good luck
@selimpsart

Hello! Thank you for the kind words, appreciated. I just experimented with prompts until I found what worked. Most of the work now cannot be reproduced with text alone, text is only for guidance. Prompt is helpful but results are more influenced by data and workflow now. No plans to become a YouTuber any time soon - I do hope that the workflow is easy enough to follow so you can set up your own multiple regional masks for conditioning and attention-masking. If you have any questions please don't hesitate to ask!


Adds most of CIS L1 Scored for Ubuntu 14.04

Updated the cis-ubuntu-1404-l1-scored.yaml to include most of the level
1 scored items.  Skipped anything that scanned the filesystem for now.

This is really great! Thanks.


Whether the size of the picture is compressed, and it is blurry after enlargement?

是否对图片大小进行了压缩，为什么放大之后比较模糊

Is there a way to have images be higher resolution when zoomed in?  I have a very high-resolution image to show, but it is compressed when zoomed in.
Thanks!


Allow "splitting" translations?

Currently, my project grew to the point that I have countless lines of raw Fluent translations in one file, which has became a bit difficult to maintain. It would be awesome if the library would let you split these translations into different files, for example you could have a seperate file for lets say, payments, and another one for dialogues or commands. Something like the following is what I'm talking about:
.
└── locales/
    ├── en/
    │   ├── commands/
    │   │   ├── greeting.ftl
    │   │   ├── goodbye.ftl
    │   │   └── change_language.ftl
    │   └── payments.ftl
    └── fr/
        ├── commands/
        │   ├── greeting.ftl
        │   ├── goodbye.ftl
        │   └── change_language.ftl
        └── payments.ftl

And to not break anyone's code, maybe there can be an option which enables this feature?
export const i18n = new I18n<Context>({
    defaultLocale: 'en',
    directory: path.resolve(process.cwd(), 'locales'),
    enableSplitTranslations: true, // Uses the directory provided above. Defaults to `false`, of course.
});

Perhaps (and apologies if this is not how the library works), this can be solved by walking every file and bundling all of them together into one translation? One issue I see with that approach is duplicate translation keys, an issue I'm not completely sure I know how to solve.
Apologies if this feature already exists in either this or the Fluent library, if it is, it would be great if someone could forward me to the related documentation as I tried searching for such feature and found nothing. Thanks!

This has been requested regularly, but so far, nobody has spent any time on this. Contributions are very welcome!


how to pass start and end date equal to null ,by default it capture today date in control

In angular-2-daterangepicker,we are not able to set date to null in control.Please let me know that how to set null date or default label in that control

Yes it is designed to select today by default if nothing is provided that is how the original daterangepicker is behaving as here. What behaviour exactly you want? Do you mean that there should not be any range selected by default if nothing is provided?

Yes,In first time when we load the page nothing should be selected until we select the range

Thanks @heenaMahajan I will try to add an option to the daterangepicker-options class in order to fulfill your requirements and release a new version in upcoming week.

hi @heenaMahajan thanks for your feedback I have added one option named 'noDefaultRangeSelected' you can set it to true in order to get the behaviour you want to, And please close the issue if you are okay with it,

Closing issue assuming it is has fulfilled requirements


arm64 on azure arm64 nodes

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
I can't run json-mock workload of version v1.3.4 on azure Standard_D2ps_v5 linux machine. In the same time it works fine for Standard_DS2_v2. Can it be an issue of multi-arch build?
Cilium Version
v1.3.4
Kernel Version
v1.3.4
Kubernetes Version
1.27
Sysdump
No response
Relevant log output
No response
Anything else?
No response
Cilium Users Document

[ ] Are you a user of Cilium? Please add yourself to the Users doc

Code of Conduct

[X] I agree to follow this project's Code of Conduct

This does not look like an issue with Cilium. @stgleb are you sure you logged this in the right repo?

@youngnick looks like issues are disabled on json-mock: https://github.com/cilium/json-mock . v1.3.4 does appear to have arm64 builds but I don't know if there is any CI validating the behaviour.
@stgleb I think it would help to understand more specifically what you experience when you say you "can't run json-mock workload". How do you deploy the workload? Are there kubectl events, logs, Pod descriptions, etc which provide some error message?


Arrow Render issue on mobile

Go-to next arrows are rendering incorrectly on mobile.

@ryan-florida

@PuranNepal Feel free to look at this issue i'm having with my website if you want to practice using git. You can fork my repository, THEN clone it on your machine for testing. The smooth click navigation arrows on my website (see them in the desktop version of sourcekode.net) are not rendering properly on mobile.  Then I can merge it into my master branch.

Just let me know if you notice anything that needs adjusting.


Add Caption to each Image?

Is there a chance to get a caption and a share button to each image?

@Urkman You can add buttons or other elements to the controller. In the sample project, I also add a cancel button to it. I am doing a new version that will allow custom view for each individual image.

Thanks... I take a look at the Example 👍

Thank you very much for making this viewer! Like it so much!


add redirect for reinvent 2021 page to current

Proposed changes
redirect /aws-reinvent-2021 to reinvent

Unreleased product version (optional)

Related issues (optional)

The file that is receiving the redirect needs to be deleted from hugo


Add deploy to netlify button

I opened this PR to add a Netlify example and one click deploy button. The netlify.toml file just populates the build command bundle output location.
test out the button here:

Let me know if you have any questions. Also if you have interest we offer a free plan at Netlify for all open source projects, check out the details here if you are interested in using it for scalable--react-boilerplate examples.

@bdougie any chance you want to add this to my TypeScript Boilerplate as well?


RIS reset doesn't clear the display and scrollback correctly

Environment
Windows build number: Version 10.0.18362.175

Steps to reproduce

Open a conhost WSL shell.
Execute printf "\ec" (the RIS escape sequence).
Note that the display isn't cleared.
Do a few directory listings or something to fill the scrollback buffer.
Execute printf "\e[41m\ec" (setting the background to red, followed by RIS).
Note that the display has been cleared with a red background, and the scrollback is only partially cleared.

Expected behavior
The RIS escape sequence should clear the display with the default background color, and should erase everything in the scrollback buffer.
Actual behavior
The RIS escape sequence doesn't work at all when there isn't anything in the scrollback. And when it does work, it clears the display with the wrong color, and doesn't completely erase the scrollback buffer.
More details
The initial RIS doesn't work because of the way the Viewport::Subtract method is implemented. When the removeMe viewport completely overlaps the original viewport, it returns a single empty viewport, but it really ought to return nothing. An empty viewport throws an exception when passed to the SCREEN_INFORMATION::WriteRect method, which is what happens when called from the ScrollRegion function here. This in turn causes the AdaptDispatch::_EraseScrollback method to fail, which then aborts the AdaptDispatch::HardReset method.
The reason the color is wrong, and the scrollback isn't fully erased, is because of the order of the steps in the AdaptDispatch::HardReset method. You need to reset the SGR state before clearing the display, otherwise it'll use the current background color for the fill color. And you need to clear the display before clearing the scrollback, otherwise the last page of content will be retained in the scrollback.
I'd be happy to provide a PR with these fixes if nobody disagrees with my assessment.

I've tagged this up for you, but we can wait for @zadjii-msft if you don't want to start on it just yet. :smile:

Yea this seems like an accurate assessment of the situation. Great find :)

I tried the CI build but printf "\ec" still doesn't clear all scrollback; reset and Ctrl-L doesn't work either.

@visualer Note that this is a fix for conhost - Window Terminal may have other problems of its own.

This also went out with Windows Insider Fast 18990! :smile:


Book Recommendation using Collaborative Filtering

💥 Proposal
Under Gssoc'23 I would like to add the book recommender using machine learning in this project. The goal would be to give the most famous books, book recommendations, and genre based recommendation for the book nerds.

@Tisha6661 - you can go ahead! We are assigning you 21 days for this project, after which it will be assigned to someone else if not completed. All the best!
Name the file as: algorithm_dataset.ipynb and link it in the readme of the labeled directory as algorithm - dataset.


Add sdr.design_frac_delay_fir()

Closes #150

Codecov Report
Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (b6f3921) 77.61% compared to head (dcfa08e) 77.80%.

Files
Patch %
Lines

src/sdr/_filter/_design_fir.py
92.59%
2 Missing :warning:

Additional details and impacted files
@@                Coverage Diff                @@
##           release/0.0.x     #164      +/-   ##
=================================================
+ Coverage          77.61%   77.80%   +0.18%
=================================================
  Files                 43       43
  Lines               2140     2167      +27
=================================================
+ Hits                1661     1686      +25
- Misses               479      481       +2

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


[AK] For #25 – Additional cleanup

Merged local cleanup branch with upstream. Many very similar changes.
Also added ping callback support because I keep needing to cherry-pick it into branches for test support.

I dig, thanks and sorry for merge hell :smile:


moved trump.jpg

Moved the file into the correct directory.

This request is even better than the last, thanks heaps!


Rename DB tables

Use the Django convention for all tables

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

3 of 3 (100.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 85.812%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
877

Relevant Lines:
1022

💛  - Coveralls


added User-Commands and Message-Commands

Pull Request Etiquette

[ ] I have checked the PRs for upcoming features/bug fixes.
[X] I have read the contributing guidelines.

Changes

[X] Internal code
[X] Library interface (affecting end-user code)
[X] Documentation
[ ] Other: _____

Closes Issue: NaN
Description
Adds the new User-Commands and Message-Commands.

Duplicate of #1765

I don't really understand why this a duplicate is?

It is a duplicate because the linked PR already adds user and message commands (which are context menus).

The user and message context commands feature PR was already proposed by aasmart and put on hold for JDA 5


Fixing the width of the calendar

When RTL is TRUE the width of the window is stretched

@andyj can you provide a before and after jsfiddle because if I try the patch the width is not enough to cover the correct width of the picker


marko-widgets by default pulling in marko runtime

marko-widgets by default is pulling in marko runtime due to this reference to ./defineRenderer. The first line in defineRenderer.js is
require('marko').
Is this needed?
If needed why is the package.json not having dependency on marko? There is only a devDependency

marko-widgets definitely requires the marko runtime (it would never be used without it). I think the reason that marko was not declared as a production dependency was so that the top-level project can declare the specific version of marko and it was assumed that that would satisfy the dependency.
However, I think it would be safe to move marko to the normal dependencies of the marko-widdgets module for clarity. The npm install command should only install marko once even if the top-level project and marko-widgets module both require it.
Anyways, I would say move marko to dependencies in the package.json.

Thanks @philidem. Based on my conversation with @patrick-steele-idem the marko-runtime is only be needed when there is client side rendering. Which makes sense, as the marko dependency is only there in the defineRenderer.js file. In our (eBay) pages, most of them are server side rendered. If that is the case why should we include the marko-runtime in the JS that is sent to the browser? Is there any other use of the marko-runtime to be needed in the browser?
Is it possible to have the client side rendering JS packaged separately in marko-widgets?

Hey @senthilp, defineRenderer() is for rendering so it will have a hard dependency on marko since marko is used for the view. Marko Widgets lets you split the renderer and widget into separate files. If you go the split renderer/widget route and you are only rendering on the server then you would only send down the widget to the browser (not the renderer) and the renderer would be used on the server. The renderer would be defined using the defineRenderer() method and the widget would defined using the defineWidget() method. The defineWidget() method does not bring in the marko runtime.

Also, please see: http://markojs.com/docs/marko-widgets/get-started/#split-renderer-and-widget

But @patrick-steele-idem having this line in the main marko-widget file, will make the lasso optimizer bundle the 'marko-runtime' too along with the widget library. Even if I split the renderer and widget it would not make a difference in the final generated JS file.


enhance securityContext of tailer pods

resolves https://github.com/metal-stack/gardener-extension-provider-metal/issues/327

Maybe we should migrate these charts to pure go in the next version to prevents such misconfigurations.


Handle Server Reflection for multiple gRPC service

Description:
Currently if multiple gRPC services are registered, Server Reflection will overlap.
By today

a user needs to be define a reflection match within a GRPCRoute for a specific hostname/authority and then rely on the authority to demux to the right backend

Relevant Links: https://envoyproxy.slack.com/archives/C03E6NHLESV/p1692986469248179

Hi @mazzy89 can you share a sample Gateway API config (Gateway + GRPCRoute) and outline your expectations using a client like grpccurl list ?
thinking out loud, one design pattern could be to create 1 GRPCRoute that matches on grpc.reflection.v1alpha.ServerReflection and mirrors the request to all backends using the mirror filter 😆 , something like
kind: GRPCRoute
metadata:
  name: yages
  labels:
    example: grpc-routing
spec:
  parentRefs:
    - name: example-gateway
  hostnames:
    - "*"
  rules:
    - matches:
      - method:
          method: ServerReflectionInfo
          service: grpc.reflection.v1alpha.ServerReflection
    filters:
    - type: RequestMirror
      requestMirror:
        backendRef:
          kind: Service
          name: grpc-svc-1
          port: 3000
    - type: RequestMirror
      requestMirror:
        backendRef:
          kind: Service
          name: grpc-svc-2
          port: 3000
    - type: RequestMirror
      requestMirror:
        backendRef:
          kind: Service
          name: grpc-svc-3
          port: 3000
      backendRefs:
        - group: ""
          kind: Service
          name: grpc-svc-4
          port: 9000
          weight: 1

nvm please ignore above example, envoy ignores responses from mirrors
https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#config-route-v3-routeaction-requestmirrorpolicy

I will post a configuration of how it should look like.

Let's assume to have two gRPC services behind EnvoyGateway foo and bar.
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: GRPCRoute
metadata:
  name: foo
spec:
  parentRefs:
    - name: example-gateway
  hostnames:
    - "grpc-example.com"
  rules:
    - matches:
      - method:
          method: ServerReflectionInfo
          service: grpc.reflection.v1alpha.ServerReflection
      backendRefs:
        - group: ""
          kind: Service
          name: foo
          port: 9000
          weight: 1
----
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: GRPCRoute
metadata:
  name: bar
spec:
  parentRefs:
    - name: example-gateway
  hostnames:
    - "grpc-example.com"
  rules:
    - matches:
      - method:
          method: ServerReflectionInfo
          service: grpc.reflection.v1alpha.ServerReflection
      backendRefs:
        - group: ""
          kind: Service
          name: bar
          port: 9090
          weight: 1

when I would run grpcurl grpc-example.com:443 list or grpcurl grpc-example.com:443 describe I would like to see the list of all the services and methods.
Currently this produce the list of methods of the first registered services. The others are overlapped.

above request is not possible today, because the current Gateway API semantics are 1 request is routed to 1 backendRef based on route matches. For case above the matches are identical (same hostname, same method, same service)
to make above request possible 1 request would need to be converted into 2 intermediate requests
as a workaround can you use different hostnames to talk to each backendRef bar.grpc-example.com & foo.grpc-example.com ?

Even having different match it won't help. Server reflection will get overlapped. Actually the workaround I made was to create another service and expose the reflection of all the service through it and register the server reflection in the grpcroute of that service.

Also in my opinion this reflection should be treated internally by envoyproxy differently. Eveytime a new grpc service is registered is reflection would be aggregate together with all the other existing reflection.


Support for [Monster Hunter Rise]

Monster Hunter Rise:

i think the save game folder is : F024294D.50755C2F12831_8fty0by30jkny\SystemAppData\wgs\000901FEA64E81B3_0000000000000000000000007D6545D7\6C15154E780E4284808888F849969DB5

Game package name: F024294D.50755C2F12831_8fty0by30jkny

an here is the Steam Version save file, thanks
Mhrise Steam Savefile.zip

Duplicate of #86.
I tried to extract your saves. Can you try these and see if they work?
monster_hunter_rise_2535468013879731_2024-09-01_18_31_43.zip

thanks for helping, but unfortunately not work.


Add logout button to sidebar

The title speaks for itself.
Just on the bottom, a single logout button.

Unnecessary function. :disappointed:


If I modify the day layout and add a background to the linear layout inside, the interface will become abnormal

If I modify the day layout and add a background to the linear layout inside, the interface will become abnormal

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_marginTop="5dp"
android:gravity="center_horizontal"
android:clipChildren="false"
android:orientation="vertical">

<!--We have top and bottom margins on the TextView so there's more space between
 continuous selected rows. This means that setting an oval background on it when
 a single date is selected will result in a the background not being a perfect circle
 since the view is not square in shape.
 So we set the background on this view which has a margin on all sides instead-->

<LinearLayout
    android:layout_width="@dimen/d40"
    android:orientation="vertical"
    android:id="@+id/ll_container"
    android:gravity="center_horizontal"
    android:background="@drawable/example_2_selected_bg"
    android:layout_height="@dimen/d40">
    <TextView
        android:id="@+id/exTwoDayText"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="4dp"
        android:gravity="center"
        android:includeFontPadding="false"
        android:padding="0dp"
        android:textColor="#181818"
        android:textSize="18sp"
        tools:text="22" />

    <TextView
        android:id="@+id/chinese"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:includeFontPadding="false"
        android:padding="0dp"
        android:text="十八"
        android:textSize="9sp" />
</LinearLayout>

<TextView
    android:id="@+id/tv_hasData"
    android:layout_width="5dp"
    android:layout_height="5dp"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="2dp"
    android:background="@drawable/bg_shap_blue"
    android:includeFontPadding="false"
    android:padding="0dp"
    android:text="." />

The preview is normal, but the display is abnormal

Try calling calendarView.daySize = Size(52dp, 52dp)
Do convert the dp values to px though. The issue happens because the specified sizes are not actually used to size the view internally.

It still doesn’t work, because the width of the ll_container layout is not measured correctly.

Try calling calendarView.daySize = Size(52dp, 52dp)
Do convert the dp values to px though. The issue happens because the specified sizes are not actually used to size the view internally.
What I need is to add a background to a certain internal layout in the item, such as ll_container

Try calling calendarView.daySize = Size(52dp, 52dp)
Do convert the dp values to px though. The issue happens because the specified sizes are not actually used to size the view internally.

Try calling calendarView.daySize = Size(52dp, 52dp)
Do convert the dp values to px though. The issue happens because the specified sizes are not actually used to size the view internally.

But the width of ll_container is larger than the parent layout. I do not know how to solve this,

I think you converted the dp value of ll_container to px and then converted it to px again. When I set the dp of ll_container to 13, his layout was enlarged by more than 2 times, the preview interface was abnormal, but the display was normal

    <TextView
        android:id="@+id/chinese"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:includeFontPadding="false"
        android:padding="0dp"
        android:text="十八"
        android:textSize="9sp" />
</LinearLayout>

my bad


Announcement Blogpost

We should write up a blogpost to accompany the announcement.
Make sure this includes:

[ ] code examples as a new example in https://github.com/cdk8s-team/cdk8s/tree/master/examples

Sent for review.

Staged


[IOSP-233] Update links to new GitHub org name

Ticket: https://babylonpartners.atlassian.net/browse/IOSP-233
Why?

The Babylon GitHub org's name was changed from Babylonpartners to babylonhealth
How?

Changing the old name to the new one

We'll need to update the GITHUB_ORGANIZATION heroku env var too once that's merged.

We are not deploying it in Heroku.


Feature: Allow organization of groups in sidebar

What feature or improvement do you think would benefit Files?
While I like how the current layout is organized: Pinned, Libraries, Drives, Cloud Drives, Network, WSL, and Tags, an ability to reorganize these groups will be huge.
I have multiple Cloud Drives—more specifically, multiple OneDrives and an iCloud. I think it would be beneficial to allow users to organize the groups however they want. Personally, I want to have my Cloud Drives above Pinned.
This implementation does not need to be drag-and-drop. It can be just the way how Reorder sidebar items works when triggering context menu from the Pinned group.
Requirements
N/A
Files Version
<IP_ADDRESS>
Windows Version
Windows 11 23H2 (OS Build 22631.4169)
Comments
N/A

Thanks for the feedback.
Is this the same as #13440?

Thanks for the feedback.
Is this the same as #13440?

Looks like it


python37Packages.z3: 4.8.9 -> 4.8.10

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/Z3Prover/z3/releases.
meta.description for python37Packages.z3 is: "A high-performance theorem prover and SMT solver"
meta.homepage for python37Packages.z3 is: "https://github.com/Z3Prover/z3"
meta.changelog for python37Packages.z3 is: ""
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS

The tests defined in passthru.tests, if any, passed

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

directory tree listing: https://gist.github.com/553ca45740e53306742269e4e84aec64

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

148 total rebuild path(s)

39 package rebuild(s)

39 x86_64-linux rebuild(s)
37 i686-linux rebuild(s)
35 x86_64-darwin rebuild(s)
37 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
acl2
boogie
cppcheck
cuter
dotnetPackages.Boogie
fstar
haskellPackages.hevm
haskellPackages.hz3
haskellPackages.linearEqSolver
haskellPackages.ntha
haskellPackages.sbv
haskellPackages.z3
libbap
petrinizer
pony-corral
pony-stable
ponyc
python37Packages.bap
python37Packages.cozy
python37Packages.manticore
python37Packages.slither-analyzer
python37Packages.z3
python38Packages.bap
python38Packages.cozy
python38Packages.manticore
python38Packages.slither-analyzer
python38Packages.z3
python39Packages.bap
python39Packages.cozy
python39Packages.manticore
python39Packages.slither-analyzer
python39Packages.z3
rsstail
slither-analyzer
solc
vampire
z3
z3-tptp
zz

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/bqfq4db6nwycmkdrql9igsbrayqsw3g2-source \
  --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 python37Packages.z3 https://github.com/r-ryantm/nixpkgs/archive/d91a15a3bafa0cbb96c6ab267b376f1450ce3033.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/bqfq4db6nwycmkdrql9igsbrayqsw3g2-source
ls -la /nix/store/bqfq4db6nwycmkdrql9igsbrayqsw3g2-source/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.
nixpkgs-review took longer than 45m and timed out

Maintainer pings
cc @thoughtpolice @ttuegel for testing.

Duplicate of #112551


glibcLocales: disable parallelism to restore deterministic locales

The way nixpkgs runs parallel localedef instances shares --prefix=/build flag. As a result localedef processes non-deterministically extend the file with new locales (hopefully without data corruption):
https://github.com/NixOS/nixpkgs/issues/245360

Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Building on:

[ ] x86_64-linux
[ ] powerpc64le-linux
[ ] aarch64-linux (cross from x86_64-linux)
[ ] mips64el-linux mixed n32/64 (cross from x86_64-linux)
[ ] pkgs.tests.cross.sanity

@ofborg eval


Anyone built with vulkan yet?

I updated llama.cpp and compiled with vulkan=1 but I get an error about compiling with -fPIC enabled.

@Ph0rk0z give it a shot again with v0.2.36 the cmake build was fixed in https://github.com/ggerganov/llama.cpp/pull/5182

llama-cpp-python worked fine with Vulkan last night (on Linux) when I built it with my PR https://github.com/ggerganov/llama.cpp/pull/5182.

It built but I have no way to select what GPU to use.

I got it to compile and install, and I can generate text much faster with it compared to clblast, but sadly the save state doesn't work, I will probably open a new issue about it tomorrow.

I'm not real sure what I'm doing wrong with it personally, but I did manage to get it to run and compile in docker. I am assuming it is selecting the wrong GPU but I am not sure how to change it. I tried changing main_gpu from 0 to 1 when initializing Llama, but got the same result. My laptop has an AMD GPU and an nvidia GPU, needs to run on the nvidia one.
Any ideas?

@Josh-XT Have you tried with lower values of n_ctx? 32768 is a lot. Try something more reasonable like 1024.

@Josh-XT Have you tried with lower values of n_ctx? 32768 is a lot. Try something more reasonable like 1024.

I'll give that a try. I actually just had it set to 0.

@Josh-XT Also, probably related to your GPU selection issue: https://github.com/ggerganov/llama.cpp/issues/5259#issuecomment-1921709786

I tried it out on Nvidia. It's right in between nvidia's cuBLAS (using all GPU layers) and openBLAS (no GPU support) for performance. I'll keep using cuBLAS, but keep an eye on it. Performance will no doubt improve as all the debugging code and safety checks add significant CPU overhead at this stage of development.

I have succesfully build llamacpp with vulkan, but cant yet build llama-python-cpp with vulkan. I always get core dump when loading the model.
With llamacpp it works fines

@userbox020 are you using cmake to build llama.cpp?

@userbox020 are you using cmake to build llama.cpp?

im using vulkan compile llama.cpp


Make node/edge highlighter objects immutable in app store

refactor
fixed reverse edge highlighting on node hover

Edges not going both ways but not sure if this is a regression

but other than that LGTM.

Edges not going both ways but not sure if this is a regression

Not a regression. In this scenario 192... has scope-app in its adjacency list, but not the other way around. To fix this for a given nodeA , we need to check the adjacency list of all nodes, to see if nodeA is in any of their adjacency lists. This is already done a few lines above, so I can reuse that result.

noice, lgtm


Create bot_pr_approval.yaml

Applicable spec: N/A
Overview
Enables the auto-approval of bot PRs. @gtrkiller could you please get this PR merged?
Checklist

[x] The charm style guide was applied
[x] The contributing guide was applied
[x] The changes are compliant with ISD054 - Managing Charm Complexity
[x] The documentation is generated using src-docs
[x] The documentation for charmhub is updated.
[x] The PR is tagged with appropriate label (urgent, trivial, complex)

@jdkandersson I'm not the owner of the charm, I'll ask around if anyone can merge the PR, thanks!


Feat rw y axis ratio

Add padding and styling to bar chart to allow a y axis manipulation, specifically geared for our horizontal bar chart
Description

add padding option for y axis to chart

Motivation and Context

we would like to give the option to format the y axis especially for horizontal bar chart

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ x ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ x ] My code follows the code style of this project.
[ x ] My change requires a change to the documentation.
[ x ] I have updated the documentation accordingly.
[ x ] I have read the CONTRIBUTING document.
[ x ] I have added tests to cover my changes.
[ x ] All new and existing tests passed.

landing!


Possible issue with the Sampler function in the tutorials and docs

Thanks for the code, this seems super cool, trying to have a go with it now. Run into this error:
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In [1], line 22
     19 MALA_Sampler = MALA(log_posterior, True, {"step_size": step_size})
     20 local_sampler_caller = lambda x: MALA_Sampler.make_sampler()
---> 22 nf_sampler = Sampler(n_dim,
     23                     rng_key_set,
     24                     local_sampler_caller,
     25                     {"step_size": step_size},
     26                     log_posterior,
     27                     model,
     28                     n_local_steps = 50,
     29                     n_global_steps = 50,
     30                     n_epochs = 30,
     31                     learning_rate = 1e-2,
     32                     batch_size = 1000,
     33                     n_chains = n_chains)
     35 nf_sampler.sample(initial_position)
     36 chains,log_prob,local_accs, global_accs = nf_sampler.get_sampler_state().values()

File ~/Library/Mobile Documents/com~apple~CloudDocs/PhD/Turing.jl/flowMC/src/flowMC/sampler/Sampler.py:71, in Sampler.__init__(self, n_dim, rng_key_set, local_sampler, likelihood, nf_model, n_loop_training, n_loop_production, n_local_steps, n_global_steps, n_chains, n_epochs, learning_rate, max_samples, momentum, batch_size, use_global, logging, nf_variable, keep_quantile, local_autotune, train_thinning)
     68 rng_key_init, rng_keys_mcmc, rng_keys_nf, init_rng_keys_nf = rng_key_set
     70 self.likelihood = likelihood
---> 71 self.likelihood_vec = jax.jit(jax.vmap(self.likelihood))
     72 self.local_sampler_class = local_sampler
     73 self.local_sampler = local_sampler.make_sampler()

File ~/miniforge3/envs/flowmc/lib/python3.9/site-packages/jax/_src/api.py:1647, in vmap(fun, in_axes, out_axes, axis_name, axis_size, spmd_axis_name)
   1512 def vmap(fun: F,
   1513          in_axes: Union[int, Sequence[Any]] = 0,
   1514          out_axes: Any = 0,
   1515          axis_name: Optional[Hashable] = None,
   1516          axis_size: Optional[int] = None,
   1517          spmd_axis_name: Optional[Hashable] = None) -> F:
   1518   """Vectorizing map. Creates a function which maps ``fun`` over argument axes.
   1519
   1520   Args:
   (...)
   1645   See the :py:func:`jax.pmap` docstring for more examples involving collectives.
   1646   """
-> 1647   _check_callable(fun)
   1648   docstr = ("Vectorized version of {fun}. Takes similar arguments as {fun} "
   1649             "but with additional array axes over which {fun} is mapped.")
   1650   if fun.__doc__:

File ~/miniforge3/envs/flowmc/lib/python3.9/site-packages/jax/_src/api.py:181, in _check_callable(fun)
    179   raise TypeError(f"staticmethod arguments are not supported, got {fun}")
    180 if not callable(fun):
--> 181   raise TypeError(f"Expected a callable value, got {fun}")
    182 if _isgeneratorfunction(fun):
    183   raise TypeError(f"Expected a function, got a generator function: {fun}")

TypeError: Expected a callable value, got {'step_size': 0.1}

Looking at the source code, it seems that Sampler's docstring + the tutorials etc. dont match the actual arguments meaning they error out, the sampler_params dict is missing from the function's arguments.
Thanks!

Thanks for the heads up Harrison, I am having a look.


Login issue

I was setup new server and install
ubuntu 20 and 18 ( I tried re install OS)
visit and ip:3000
entered email and password
but just loop in login page
if i entered change password and return error msg
but collect email and password is loop in login page

COOLIFY_APP_ID=f7b0cf49-c783-4c45-a020-94d6b20258a3

Hey, I found the issue in svelte-kit-cookie-session library I'm using for session cookies. I'm reverting it to an older version.
A new version is released v2.0.13, but you probably need to reinstall Coolify again. Sorry about that!


Camel, snake and kebab cases is working only by pasting text

Need to allow spaces and other symbols while typing.

This can be possible only by filtering > words.

let words = 'hello world1'.match(/[\p{L}\p{N}]+/gu)
let filteredWords = words.map(function (value) {
    return upperFirst(value)
})
let camcelCased = filteredWords.join('')


Limit the maximum size for a volume.

Should the limits be per tenant/datastore or just datastore?

Addressed with #603 and tech-preview available in Oct 2016 release.


Download external dependencies via CMake at configure time

Uses Cmake FetchContent to download external dependencies, rather than them being tracked within the repo.
This removes a lot of code (Thrust/CUB) which  we don't need to track, just the version we want to use.
Jitify and Tinyxml2 aren't packaged in a super friendly way for this, so some awkwardness.
Thrust/CUB packaging from 1.9.10 is very cmake friendly, but they have a workaround in place that causes issues, so I found a workaround for their workaround to avoid initialisation order warnings being generated.
There is room for further improvements / polish, which i'll add to an issue for future cleaning (better logging for end users, documentation for how to provide your own versions, cmake option to disable downloading for meterred connections).
This upgrades the version of Thrust/CUB being used to get a bugdix for ExclusiveSum which was triggering a swig related test failure on some machines.
Also downloads googletest with fetch content (much simpler)
~This may need some adjustments for Windows (shouldn't, but might).~
Edit - this does need some adjusting for windows :cry:
Closes #284

~I'll try and get around to running this branch locally before I approve it but it looks good.~
On generate, cmake 3.18.0.rc1 gives me
CMake Warning (dev) in build/_deps/googletest-src/googletest/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "gtest_main".
This warning is for project developers.  Use -Wno-dev to suppress it.

Was this not fixed in master already? (Edit, appears to be waiting in #314)
Tests build and run for me VS2019 (werror off)

CUDA_ARCHITECTURES is a separate PR, as is WError fixing.

This is fine to be merged once conflict resolved.

5f21b7d tested locally on windows (CUDA 11, VS 2019), so hopefully CI will be happy now (and i've not broken linux again)


Update & Review

Trying out this bounty to see if it works with the current versions of;

agoric-sdk
Akash Network
Hermes

cc @jeetraut

Thanks!
Jeet
http://jeetraut.com/
On Wed, May 31, 2023 at 5:47 PM anilhelvaci @.***>
wrote:

Trying out this bounty to see if it works with the current versions of;

agoric-sdk
Akash Network
Hermes

cc @jeetraut https://github.com/jeetraut
—
Reply to this email directly, view it on GitHub
https://github.com/anilhelvaci/dapp-akash-controller/issues/1, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ABSLF7ONP7XIZEGJL3ZJ2V3XI5RXZANCNFSM6AAAAAAYVVHZAQ
.
You are receiving this because you were mentioned.Message ID:
@.***>


Please show how to use gradle tasks with multiple tasks

The commented-out examples in the snippet are quite helpful but aren't quite full reference documentation on how to compose a gradle task. My specific problem is that I'd like to run two tasks 'build' and 'test' from the one step. The schema for the Gradle@2 task suggests this is possible as the fields is plural ("tasks") but I have not found how to specify more than one.
I have tried:
...
   tasks: 'build,test'
...

which ran but resulted in error message "Task 'build,test' not found in root project"
I have also tried
...
  tasks:
    - 'build'
    - 'test'
...

which caused a failure to even queue the job (message: "/azure-pipelines.yml (Line: 18, Col: 9): A sequence was not expected"). Could you document how to use the apparent plurality of this field?

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

ID: 00499395-fdc3-b150-3469-aee2f9fb7cbc
Version Independent ID: 44e630e1-1689-2d2e-212b-3ce2baf8771f
Content: Gradle build and release task - Azure Pipelines
Content Source: docs/pipelines/tasks/build/gradle.md
Product: devops
Technology: devops-cicd
GitHub Login: @DavidStaheli
Microsoft Alias: dastahel

I eventually figured out that space-delimited was the right option. So:
...
  tasks: 'build test'
...

...exactly as gradle excepts on the command line. Seems obvious now but the plural field-name made me think that the Azure Pipelines wrapper was somehow managing the different tasks. Leaving the issue open so that the dev team can decide whether it merits a change.

Thanks for reporting this. The documentation has been updated and should be live within a few days.

Thank you!

if more than one task is added, are they going to execute sequentially, or in parallel?


Seems to be a typo in transforms.py

Hi, thanks for sharing the code.
It seems to be a type in
https://github.com/yjxiong/tsn-pytorch/blob/master/transforms.py#L135
where "875" seems to be ".875".
Thanks.

Thanks for spotting the issue. Just updated the file and fixed it.
6b51fc28e87d61070b26d7454e5b169042fc851f


Terminal excessive space on top

VS Code Version: 1.55.2
OS Version: Darwin x64 20.3.0 / macOS 11.2.3

Steps to Reproduce:

Start VSCode (code --disable-extensions)
Start a terminal
Try following:

move terminal to the side, split them, them move the spliter up/down
resize vscode

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

Terminal may have excessive space on top that cannot be clicked (to get focus). It is very inconsistent. Sometime it does not happen, sometimes bigger, sometimes smaller, sometimes happen to bottom also. Following are 3 screenshots with non-clickable space highlighted by green rectangle:

Without steps to reproduce this, we can't investigate it. Please update this if you identify a way we can

I don't have a monitor large enough to check this but I believe we made some improvements recently here, could you check if it still happens in the Insiders build? https://code.visualstudio.com/insiders
Also the first 2 could just be 1px too small and working by design.

@meganrogge Add a bit more, but really not much to add to reproduce.
It happen by just starting/resizing the terminal or vscode.

@Tyriar
Not sure what mean by "1px too small". Those empty space highlighted by green rectangle are higher than 1 text line within the terminal, cannot be clicked and won't go away unless I resize vscode, or the spliter. And it extents to the scroll bar too.
It doesn't need big monitor to see, but it is a bit by chance:

It is not just about the visual. It actually become quiet annoying when changing focus to terminal by clicking the window, and end up clicking those empty space, it does nothing(focus didn't change), then you start typing and suddenly realize you are still typing in the editor.

I discover the issue is caused by zoom. I had it on 3 for screen sharing session sometime ago and forget to switch back. Once I change it back to 1, the issue is almost gone and don't affect work flow anymore.


Align DescriptorCluster and SemanticTagStruct with the spec draft

The latest changes move the Label field from TagStruct to SemanticLabelStruct.  As a result:

TagList attribute in the Descriptor  cluster changes types to list[SemanticLabelStruct]
SemanticLabelStruct contains the following fields:

ID
Name
Type

0
MfgCode
vendor-id

1
Namespace
namespace

2
Tag
tag

3
Label
string

Fixed with #27905 and #28753


Add makefile and update Readme.md

fixes #2
Changes

Add a Makefile
Add information in the readme file

Thanks @jphetphoumy


Why the "completion callback"  of the Sync.changes() method doesn't return the NSManagedObject

By exemple I want get the Message object in the completion callback like this:
Sync.changes(message , inEntityNamed: "Message", dataStack: DataManager.manager, completion: { (error, message ) -> Void in

     print("NSManagedObject Message \(message)")

  })

Currently, I have to excecute a fetchRequest, whereas the object is probably already got in the "changes" method.

You're right, internally there's a array of messages that got updated or inserted, but this items belong to a background thread, returning them wouldn't be safe.
Normally I use Sync in conjunction of NSFetchedResultsController which means that I don't face the need of fetching an array of changes. This is what I've been using: https://github.com/3lvis/DATASource
I hope this makes sense to you.

I don't find no use of Sync in your DATASource Project https://github.com/3lvis/DATASource
That is great but I have to excecute an API request to get JSON data:
    NSFetchRequest *request = [[NSFetchRequest alloc] initWithEntityName:@"User"];
    request.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"firstLetterOfName" ascending:YES], [NSSortDescriptor sortDescriptorWithKey:@"name" ascending:YES]];

    _dataSource = [[DATASource alloc] initWithCollectionView:self.collectionView
                                              cellIdentifier:CollectionCellIdentifier
                                                fetchRequest:request
                                                 mainContext:self.dataStack.mainContext
                                                 sectionName:@"firstLetterOfName"
                                               configuration:^(UICollectionViewCell * _Nonnull cell, NSManagedObject * _Nonnull item, NSIndexPath * _Nonnull indexPath) {
                                                   CollectionCell *collectionCell = (CollectionCell *)cell;
                                                   User *user = (User *)item;

                                                   [collectionCell updateWithText:user.name];
                                               }];
    _dataSource.delegate = self;

Yeah, DATASource is not connected to Sync. DATASource is just a NSFetchedResultsController wrapper.

I think I found your use case, this is what I have in my app, and two ways of doing it:
Fetcher:
func updateAlbum(id: String, title: String, description: String, completion: (error: NSError?) -> ()) {
    let parameters = [
        "title": title,
        "description": description
    ]
    self.networking.POST("/photos/v1/albums/\(id)", parameters: parameters) { JSON, error in
        self.dataStack.performInNewBackgroundContext({ backgroundContext in
            guard let JSON = JSON as? [String : AnyObject] else { fatalError("Album JSON has inconsistent structure") }

            let fetchRequest = NSFetchRequest(entityName: Album.entityName())
            fetchRequest.predicate = NSPredicate(format: "remoteID = %@", id)
            let album = try! backgroundContext.executeFetchRequest(fetchRequest).first as! Album
            album.hyp_fillWithDictionary(JSON)

            try! backgroundContext.save()

            dispatch_async(dispatch_get_main_queue(), {
                completion(error: error)
            })
        })
    }
}

Controller (version A):
func albumInfoController(albumInfoController: AlbumInfoController, didSaveWithTitle title: String, description: String) {
    self.fetcher.updateAlbum(self.album.remoteID!, title: title, description: description) { error in
        self.dismissViewControllerAnimated(true, completion: nil)
        self.album.managedObjectContext?.refreshObject(self.album, mergeChanges: true)
    }
}

Controller (version B):
func albumInfoController(albumInfoController: AlbumInfoController, didSaveWithTitle title: String, description: String) {
    self.fetcher.updateAlbum(self.album.remoteID!, title: title, description: description) { error in
        self.dismissViewControllerAnimated(true, completion: nil)

        let fetchRequest = NSFetchRequest(entityName: Album.entityName())
        fetchRequest.predicate = NSPredicate(format: "remoteID = %@", self.album.remoteID!)
        self.album = try! self.album.managedObjectContext!.executeFetchRequest(fetchRequest).first as! Album
    }
}

Fill with dictionary method


Improve docs on GRPC_OP_RECV_CLOSE_ON_SERVER

Clarify that the op always succeeds, just as the doc for GRPC_OP_RECV_STATUS_ON_CLIENT states.
Please check for correctness of what I'm claiming.

LGTM

Only docs changes - merging.


Whois: Made names clickable + always displaying up to 50 users, even if there's more than that

The usernames are now clickable, meaning right-clicking / tapping them makes mentioning and managing the user very easy (don't worry, it will not ping the users, I have tested that).
Also now there will always be displayed up to 50 users, but if the amount of users exceeds this number, a ... will be added to the last line and the footer will be updated with the actual number of members with the role and the text (too many to display).
Example with a limit of 2:

Same example but with limit of 50:

@IllusionMan1212 There were actually like 6 lines with whitespaces, I removed them all now


Using in or exists Criteria in request.Criteria

Hi,
I'm using Oracle in my project and wondering if it's possible to use "in" or "exists" in request.Criteria as the below example:
var request = this.view.params as Serenity.ListRequest;
            request.Criteria = Serenity.Criteria.and(request.Criteria,
                [['DEPT_CODE'], 'in', "(select DEPT_CODE from USERS_DEPTS_INFO WHERE USERID=" + vUserID +")" ]);

or
  ['DEPT_CODE'], 'in', "(" + vUserDepts +")"
I want the grid to show the user departments courses only, but it shows no records, no errors, no console messages, if I remove the criteria it shows all records.
If not possible I will change to stored procedure.
Thanks

You can't use arbitrary SQL in client side criteria, as clearly noted in docs.
That filtering must go to server side applyfilters.

Thanks Volkan, that what I thought. I've converted this to stored procedure.


Adding modifying field extraction

Adding a method for extract the fields that are being modifying in a mutation. The idea is to have a list of fields where each field is identified by the path (type.field). e.g.
Having as schema and query:
...
input PersonInput {
    firstName: String!,
    middleName: String,
    lastName: String!
    location: LocationInput
}

input LocationInput {
    name: String!,
    description: String
}
...

mutation addingPerson($name: String!) {
    addPerson(person: {
        firstName: $name,
        middleName: null,
        lastName: "Fixed Last Name",
        location: {
            name: "Fixed Location Name"
        }
    }) { id }
}

The list of fields that are being modified are:
person.firstName, person.middleName, person.lastName, person.location.name
Note that person.location.description is not provided, hence, it won't be listed.

@smotavitaendava thank you for your PR, however, I don't think this feature is ready to be merged the way it is right now. I'm going to close this PR and will consider working on this when I work on the selected fields. In any case, it would be better off to start with opening an issue where we can discuss the actual implementation before proceeding with a PR. The functionality of the current PR could be implemented by using nullable types where you check if the field has been provided and if yes, then track that field in an array.


Add Kolyphemus System Continued from SpaceDock

This pull request was automatically generated by SpaceDock on behalf of DavianLin, to add Kolyphemus System Continued to CKAN.
Mod details:
name = /mod/2055/Kolyphemus%20System%20Continued
author = DavianLin
abstract = KolyphemusSystem is back!!!
license = CC-BY-NC-SA
Homepage = http://jebhangar.ru/
description = KolyphemusSystem is back!!! So, you can see a blue giant and a Pandoor planet from the Avatar movie again! Also, Moei and Kalatea are back too!
Please direct questions about this pull request to DavianLin.

This was added in #6960.


remove contains method

Remove contains method

Codecov Report
Base: 65.62% // Head: 61.57% // Decreases project coverage by -4.04% :warning:

Coverage data is based on head (5c56e52) compared to base (6d0cdbd).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #108      +/-   ##
==========================================
- Coverage   65.62%   61.57%   -4.05%
==========================================
  Files          11       11
  Lines         893      799      -94
==========================================
- Hits          586      492      -94
  Misses        307      307

Impacted Files
Coverage Δ

shellfirm/src/config.rs
84.81% <ø> (-0.07%)
:arrow_down:

shellfirm/src/checks.rs
73.83% <100.00%> (-12.17%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Automated cherry pick of #8019: make with ARCH argument

Cherry pick of #8019 on release/3.4.
#8019: make with ARCH argument

/lgtm
/approve


Issues found by AB testing

Websocket should be able to use command or `method
when ledger_index is string, try to parse as a number

This change is

Should have made this a draft PR, don't worry about reviewing

Ok, so checks passed... I'll stop force pushing while this is being reviewed :)


ravedude/avrdude cannot program trinket with bundled avrdude.conf

It seems like the Adafruit Trinket requires a slightly modified avrdude.conf for programming, since the built in bootloader "acts a little bit different than other off-the-shelf programmers".
After updating the ravedude-bundled avrdude.conf file with the suggested changes from the Adafruit documentation I can successfully program my Trinket with ravedude on a MacbookPro. According to adafruit these changes should not affect the programming of bare attiny85 chips, so would it be possible to include these changes in the bundled avrdude.conf?
I have published the required changes in a branch in my forked repo; https://github.com/dalpil/avr-hal/commit/24f182fbfa7bc1759f90fb8260744bc208d7d72d
When programming the Trinket from a Ubuntu machine I also had to add the suggested configuration to udev.
Without the suggested changes to avrdude.conf i keep getting output from ravedude/avrdude like this (for the sake of searchability);
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e930b (probably t85)
avrdude: erasing chip

avrdude: error: usbtiny_transmit: Input/output error
avrdude: reading input file "/Users/mac/Code/avr-hal/target/avr-attiny85/release/trinket-blink.elf"
avrdude: writing flash (378 bytes):

Writing |                                                    | 0% 0.00s
avrdude: error: usbtiny_send: Input/output error (expected 64, got -5)
Writing | ########                                           | 16% 0.00savrdude: 7 retries during SPI command
avrdude: 7 retries during SPI command

...

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0x00 != 0x0e
avrdude: verification error; content mismatch

...

Last but not least; thank you for developing/maintaining ravedude/avr-hal/avr-device et.al. It has made developing with Rust on my AVR-boards a pleasure. 👍

Hey, yeah, I think we can pull in this change.  As long as other ATtiny MCUs still work I don't see a problem here.  We can always revisit this later if something does come up.

PR submitted.


[Production & Staging] Add-on Icons are Draggable in Google Chrome

Steps
In Google Chrome, go to a project with at least one component
Enable a few external storage add-ons for the project
Go to either the files tab or the project overview page
Collapse all the add-ons so that you can see them all (helpful if you have a ton of files)
Click an icon and drag it out of the container
Unlike issue #2263 that occurs in IE the icon cannot be dragged into another add-on
Expected
I expect that the icons would be non-draggable
Actual
The icons are draggable in Google Chrome, and dropping them outside of the container causes an error in the Javascript code. Image below is a screen shot of the error that occurs when an add-on icon is dragged outside of the add-on container.

.

Good catch! You want to take this one on too @leb2dg ? Thanks.

Yes, I'll take this one as well!

OK good - Thanks.

Closed by #2793


Carstream not working in Volkswagen Polo

Hello
I am using
AA version 3.0.570554
Car stream Version : V1.8.3
I have followed the steps mentioned by you using of Apk Editor Pro.
but when I play videos in it says click on the bottom right to play YouTube but when I click i get only one option return to Volkswagen.

Check the issue https://github.com/thekirankumar/carstream-android-auto/issues/116
Follow the instructions it must work

You can either use the guided windows program in issue #116


'Console was not found on network. Probably failed' error

Hi,
I've followed the setup instructions as detailed, but get the below error message when trying to turn the xbox on.
'Console was not found on network. Probably failed'
If I manually turn the console on, I can turn it off using HomeKit, but not turn it on.
Any help would be appreciated
Thanks

https://github.com/grzegorz914/homebridge-xbox-tv#configuration-console

Thanks for getting back to me. I worked out that the issue was I hadn't entered the Live ID correctly. All working now.
Thanks,
Again

Thanks for the resolution


Segregated Witness support

@afk11 it is soooo much simpler when you have a clear reference to work from (bitcoinjs) hah


Collector(Realm), take 2

Detailed designs
Realm is a custom domain of memory reclamation.  Currently we have a single global singleton realm.  This PR allows users to define their own realm.  Example:
use crossbeam_epoch as epoch;

let realm = epoch::Realm::new();

let handle = epoch::Handle.new(&realm);
let handle.pin(|scope| {
    scope.flush();
});

User can also use the "default" realm with the existing interface:
use crossbeam_epoch::{pin, Scope};

pin(|scope| { // pinning to the default realm
    scope.flush();
});

Motivation
There are two motivations behind custom realms.  First, custom realms enable us to test Crossbeam more easily (cf. #17).  In general, it is cumbersome to test singletons.
Second, low-level libraries require custom realms.  For example, elfmalloc, a Rust implementation of memory allocator, internally uses Crossbeam but it doesn't want to store the handle (think: a participant of EBR) in the thread-local storage (cf. https://github.com/crossbeam-rs/rfcs/issues/12).
In order to do that, elfmalloc should be able to make a custom realm and create handles to them.
Questions
"Realm" might not be the best name for that.
Now Handle has a reference to the global data for EBR (Realm).  It will add an extra cost of indirection, which might hurt the performance.

Naming is hard, but Zone or Sector might be better.
I don't think self.realm.xxx() is going to introduce noticeable overhead, calls to these are rare compared to pins() and defer()

@arthurprs I renamed realm to zone.  I think it reflects the notion better.  Thanks!

Is there a particular reason why we have Handle::new(&zone) instead of zone.add_handle()? The latter seems nicer, doesn't it?
Handle<'a> is tied to a lifetime because it contains a reference to the underlying Zone. I believe the lifetime will almost always be 'static except in our tests. Unless I'm mistaken, in the discussion on elfmalloc @joshlf probably had in mind Handle without lifetime that holds an Arc<Zone> instead of &'a Zone.
I can imagine a scenario where you create a thread pool, create one Handle<'a> per thread, store handles into thread locals, and then just forget about the Zone because you don't really care about it. But you still have to store it somewhere and make sure it lives longer than all the handles. But this kind of memory management is a non-issue if you just use Arc...
On bikeshedding:

Jemalloc has arenas (I like thinking of those as suballocators).
Tokio has reactors (thread pools driving I/O).
Rayon has pools (of worker threads). There is an implicit global pool, but you can create your own pools as well.
By the same logic, I guess we probably have... collectors? They collect garbage/deferred functions onto one big pile (but handles do some buffering), and destroy/execute them from time to time. Just an idea...

Unless I'm mistaken, in the discussion on elfmalloc @joshlf probably had in mind Handle without lifetime that holds an Arc<Zone> instead of &'a Zone.

That's correct. Another concern I'd have with this design is: is it possible for this to compose nicely? Let's say that I have another handle-based API which wants to use a Zone under the hood. If I have to construct a Zone explicitly, then I'll put it in the global data. Let's call it Global. Each of my handles will have an Arc<Global>. Each handle will also need to have a Crossbeam Handle which references the global Zone. However, that Crossbeam Handle will be a field in the Handle type that I'm writing, and will need to hold a reference to a different field of the same struct (namely, a reference to the Zone in the Global which is referenced by the Arc field in the handle). I'm not sure whether it's possible to make those lifetimes work out - currently, none of the lifetimes of the fields of a struct outlive one another.

By the same logic, I guess we probably have... collectors?

For what an outsider's opinion is worth, I like this. Collector is a nice name for the type. GC works too (more pithy), although it's not usually a singular noun (maybe it stands for a "garbage collector"?).

I renamed zones and handles with collectors and mutators.  I think they better reflect what they do.
I added Collector::add_mutator(&self), and removed Mutator::new().

On the comment @joshlf just gave and the one on Arc<Collector>, I'll think more on it today.  Thanks!

Here is my proposal for composability.
We split Mutator into two: (1) a struct that implements the CollectorAccessor trait, which has an accessor to the global data Collector; and (2) MutatorInner: another struct that has other components including the local bag.
Your Handle may have MutatorInner, and implements CollectorAccessor using its own accessor to its own global data.  For more composability, you may be able to define HandleInner for the same spirit.

Taking inspiration from @joshlf's logger example (and also mpsc and chase_lev), would the following be a good interface for use in elfmalloc?

Click to expand
struct Collector { ... } // Note: private type

pub struct Handle {
    collector: Arc<Collector>,
    // bag, local_epoch, is_pinned, pin_count...
}

impl Handle {
    pub fn pin<F, T>(f: F) -> T where F: FnOnce(&Scope) -> T { ... }
    pub unsafe fn unprotected<F, T>(f: F) -> T where F: FnOnce(&Scope) -> T { ... }
}

impl Clone for Handle {
    // Registers a new handle and returns it.
    fn clone(&self) -> Self { ... }
}

// Creates a new collector and returns the only handle to it.
pub fn collector() -> Handle { ... }

lazy_static! {
    static ref GLOBAL: Handle = collector();
}

thread_local! {
    static LOCAL: Handle = GLOBAL.clone();
}

A potential oddity here is that we have a useless global handle (basically a sentinel handle), which makes the list a little one node longer than is necessary. But I don't see this is as a big issue.

We split Mutator into two: (1) a struct that implements the CollectorAccessor trait, which has an accessor to the global data Collector;

I wonder if we need access to the underlying Collector at all. With mpsc you have Senders and Receivers (which are similar to our handles), but don't have access to the underlying queue.
Our Collector would probably have only a single method add_handle, but we can achieve the same thing by making handles clonable (just like you can create multiple Receivers by cloning them).

I'm slightly worried about the use of Arc here.  I believe we can handle this issue without relying on reference counting..

I wonder if we need access to the underlying Collector at all. With mpsc you have Senders and Receivers (which are similar to our handles), but don't have access to the underlying queue.

In the current implementation, each mutator has a collector: &'scope Collector as its field.  I'm proposing (1) defining MutatorInner without that collector field, and (2) defining Mutator as a struct of a collector reference field and a MutatorInner.

Nit: I think these functions you defined are supposed to have &mut self parameters? As in:
impl Handle {
    pub fn pin<F, T>(f: F) -> T where F: FnOnce(&Scope) -> T { ... }
    pub unsafe fn unprotected<F, T>(f: F) -> T where F: FnOnce(&Scope) -> T { ... }
}

should actually be:
impl Handle {
    pub fn pin<F, T>(&mut self, f: F) -> T where F: FnOnce(&Scope) -> T { ... }
    pub unsafe fn unprotected<F, T>(&mut self, f: F) -> T where F: FnOnce(&Scope) -> T { ... }
}

I'm slightly worried about the use of Arc here. I believe we can handle this issue without relying on reference counting..

I agree with @stjepang that there shouldn't be much of a performance hit here. The only extra code execution that Arc incurs is when you clone, which should be relatively infrequent. During any other method call on a Handle, the performance of following an Arc reference is identical to the performance of following a & reference.

@joshlf Yeah, I forgot about that. Also, mut is not necessary here: &self is good enough.

Do you not need to be able to modify local garbage lists?
On Sep 27, 2017 12:48 PM, "Stjepan Glavina"<EMAIL_ADDRESS>wrote:

@joshlf https://github.com/joshlf Yeah, I forgot about that. Also, mut
is not necessary here: &self is good enough.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/crossbeam-rs/crossbeam-epoch/pull/21#issuecomment-332635145,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA_2Lw4PN_ofiYyHBA8JN44rh__IIPuFks5smqZ1gaJpZM4PjmGF
.

We do modify it, but it's inside an UnsafeCell. Note that when accessing LOCAL you don't get a mutable reference (unless you wrap the thread-local into a RefCell, which incurs performance cost) so we have to deal with immutable references anyway.

Ah good point.

@stjepang @joshlf I implemented my idea in this branch: https://github.com/jeehoonkang/crossbeam-epoch/tree/handle-composable . You may be interested in the code that composes a logger handle and a GC handle: https://github.com/jeehoonkang/crossbeam-epoch/blob/handle-composable/src/mutator.rs#L384

It seems tokio people are dealing with the exactly same problem: https://github.com/aturon/tokio-rfcs/blob/tokio-reform/tokio-reform.md#rationale-and-alternatives  Roughly speaking, it seems futures : tokio = elfmalloc : crossbeam.

I'd still really like to see all <'scope>s removed from the file. Those lifetimes just feel overly verbose (appear 48 times in the file!), distracting (more reading/typing for no increase in clarity), and uncomposable (lifetimes are difficult to get around).
From the user's standpoint, what does &'scope Scope<'scope> even mean? We are borrowing a Scope, and there is another lifetime tied to it... but  why? The <'scope> provides no additional information nor safety to the user. Just &'scope Scope is good enough, clear, and simple.
And the following looks kinda silly... :)
fn insert<'scope>(&'scope self, data: T, scope: &'scope Scope<'scope>) -> Ptr<'scope, Node<T>>
                                                              ~~~~~~ what is this?

It makes sense for Ptr<'scope> to have a lifetime because we handle pointers by value. But Scopes are always handled by reference. There is no way for the user to obtain a Scope at all - they can only have &Scope (obtained via pin and unprotected). And this reference already holds the lifetime of the scope, so there's no need to introduce an additional lifetime.
Mutator<'scope> implies that mutators live within a scope. This is true in our tests, but is typically not true in elfmalloc nor other crates that use crossbeam. It's also confusing because Mutator<'scope> sounds like something that has to do with Scope, but it doesn't.
Also, note that references are less composable than Arcs and lifetiems can be hard to satisfy.  How would you do that without blocking the current thread?
let col = Collector::new();
crossbeam::scope(|s| {
    for _ in 0..4 {
        let handle = col.handle();
        s.spawn(move || ...);
    }

    // The current thread blocks here. Can we avoid this?
});
// `col` gets dropped.
// Finally, the collector is destroyed.

But, if the collector is backed by an Arc, things are much easier:
let col = Collector::new();
for _ in 0..4 {
    let handle = col.handle();
    s.spawn(move || ...);
}
// `col` gets dropped.
// The underlying collector is destroyed as soon as all threads finish.

In your example it is assumed that the global handle lives forever. But what if you want to automatically destroy it as soon as all threads using it exit? It's going to be painful to satisfy lifetimes then.
Finally, I'd just like to add that there is a strong precedent for using Arcs in situations like these:

std::thread::Thread is basically an Arc - here
In tokio, Core is backed by an Arc - here and here
In rayon, ThreadPool holds an Arc - here

As you can see, Arcs are perfectly valid tools for situations where you want less strict ownership. Don't get me wrong -- lifetimes are a great feature of Rust, but I think this is not the right use case for them.
Also, do we really need traits here (the Mutator trait)? This increases the API surface and doesn't seem particularly useful. Why would elfmalloc implement Mutator trait for its own types instead of just accessing the inner handle? Seems like this API could be made much simpler.
Finally, we might have went overboard with names - there are collectors, mutators, threads, handles, and now even Impl. :) Let's pick two - I like Collector and Handle (those are like Core and Handle in tokio).

Is enabling crossbeam to be no_std within the scope of this?

@arthurprs Not yet, but it could be a first step towards no_std.

@jeehoonkang
Regarding Scope<'scope> vs &'scope Scope, I'd be okay with either, since they're equivalent.
If we go with the former, then we could make Scope a Copy type and define pin like this:
impl Handle {
    pub fn pin<F, T>(&self, f: F) -> T where F: for<'scope> FnOnce(Scope<'scope>) -> T { ... }
}

This essentially makes Scope<'scope> a reference to the pinned scope, just like the old &'scope Scope.

I fully agree with @stjepang.  Thank you for the well-thought argument that I can easily understand.
Now I'm implementing what he proposed in https://github.com/crossbeam-rs/crossbeam-epoch/pull/21#issuecomment-332474851 .  I'm almost done, but a problem remains: Handle is not Sync, but his proposal has GLOBAL: Handle in lazy_static!.  It simply doesn't compile.  For that reason, maybe we have to keep the Collector type public.

It simply doesn't compile. For that reason, maybe we have to keep the Collector type public.

Oh, right. Yeah, let's make Collector public. After all, tokio's Core is public as well.

@stjepang @joshlf I updated the branch.  Please take a look :)

Echoing a previous comment by @stjepang , is there a reason that Collector needs to be public? It's just a newtype around an Arc<Global>, and each Handle has an Arc<Global>, so maybe the interface would be cleaner (and no less powerful) if the only public type was Handle?
Perhaps the answer is that Handles are more heavyweight (e.g., maybe the Bag they contain is expensive). In that case, it might at least be worth it to add a function to Handle that is a synonym for Collector::new().add_handle(). Maybe we could switch new() to being such a function, since Collector::add_handle() already serves the purpose of creating a handle from a Collector.

But generally this looks awesome! I'm really excited to be able to use this in elfmalloc :)

Can we include 1 or 2 simple tests in this PR as well? I'd go a long way visualizing the end result.

@jeehoonkang

Type signature of pin(): After changing the type as you described, I couldn't satisfy the compiler for the following line: https://github.com/jeehoonkang/crossbeam-epoch/blob/handle/src/default.rs#L27 .  What do you think?

Did you change the signatures of both pins (the one in impl<'scope> Scope<'scope> { ... } and the one in default.rs)?

@stjepang Changing the type of both Handle::pin() and pin() doesn't work.  But interestingly, changing only the type of Handle::pin() works: https://github.com/jeehoonkang/crossbeam-epoch/tree/handle-scope .  I really don't understand the lifetime logic here, though..  If pin() anyway needs for<'scope>, than I'd like to use it for Handle::pin(), too.  If there is a solution to this type checking issue, I'd like to adopt it.

Hey all, I'm really impressed with this work, looks like a good direction for the future. I now see why we need this, but it took me quite a bit of digging around the repo to understand it.

In retrospect, it would have been better to put this PR as an RFC first. If we still has unresolved issues, I'd like to make an RFC based on this branch..

For this reason, I agree with the above comment. We've had RFCs for much smaller PRs and this one is a really big change with sizable tradeoffs. I suggest that this should not be merged before at least an overview RFC is accepted. It should contain the motivation behind the changes (step towards supporting no_std and customized allocation/thread environments), the intended usage (consumer such as elfmalloc can provide the same globals that were previously provided by crossbeam) and some of the design details (Arc vs. borrows). crossbeam-rs/rfcs#10 contained a bit on this topic, but there's much more in this thread.
Furthermore, we desperately need benchmarks. Without them, it's just guesswork as to what might be more performant. I tried benchmarking this branch on an ARM server and it seemed okay, but the spread (measurement uncertainty) was way too high to call the results meaningful. I'll try to look into this some more. @martinhath also seems to be interested in benchmarking memory recollection schemes.

I wrote an RFC: https://github.com/crossbeam-rs/rfcs/pull/15 .  As @Vtec234 suggested, let's block this PR until an RFC is passed.

@stjepang I'm eradicating them now.. :)

I just removed Collector::collect().  Shall we merge..?