Making a database to which anyone can add new entries, but only edit or delete their own content

I'm still circling around my idea of creating a social media or art gallery site using nothing but IPFS and OrbitDB. Orbit's current rigidity on permissions makes this very difficult: It's not easy to find any reasonable format when a database can be either written to by everyone or only written to by the owner, as you need write access to let your users use the site but giving it to everyone means any troll can freely edit or delete the entire database.
I wanted to ask about a compromise idea: Would it be possible to create a database in which anyone can create new entries, but users may only delete their own entries? I'm particularly thinking of docstore here, since I remember it's the only one that supports indexing which is needed for large sites.
For example: User A creates a database. They then post a new object to it, followed by users B and C. Since user A owns the database, they can delete both their post and those of B and C... however user B can only delete their own entries without touching those of A or C, whereas C can only delete theirs without any editing rights over those of A and B.

Thanks for the question!
I might suggest the followinh approach using nested database address:

Create a master database that anybody can write to and add entries. Validate this data carefully, but in the end allow any valid entries. Let's make this a docstore, indexed by the public keys of the users connecting to it.
When each entry is created, create a new keyvalue database with per user ACL and store the address of this new database back in the global docstore. This database would be where the true user data lives. This could be any type, I just picked keyvalue at random

Nesting the databases in this way allows you to maintain a global index of all your users and allow anybody to join in freely, but then constrain them inside their own databases via ACL.

I've thought about using a database of databases, but that approach seems complicated too. The main issue is that, the master database pointing to the sub-databases needs to be writable to by anyone so that the list can be updated, but this again has the issue that anybody can edit or delete its entries. This is at least true for docstore, which is required for indexing and good performance.

One workaround to that issue is to only validate edits made by the same key used to make the original entry and ignore any delete operations. This would require a custom store approach.

Create a master database that anybody can write to and add entries. Validate this data carefully, but in the end allow any valid entries. Let's make this a docstore, indexed by the public keys of the users connecting to it.

could you have the docstore indexed by public keys only allow entries on an index that are signed by the person with the matching public key?

The problem with docstore is that you can only set it up in one of two ways: Either only the owner can make changes but everyone else can read it, either everyone can make changes as well as read it. In the first case, the system is unworkable for users because the database owner needs to manually approve every change thus each user must go through them which is absurd. In the second case, the system works for everyone but any troll with a script can wipe out the database and even worse edit other people's posts and even impersonate them. There's just no in-between way.
If no solution is found I'm thinking of going with a recommendation system: Every user has their own database which only they can edit, from which they may watch other users... the users they watch will then display in their feed, which others can use as its own website. It's the only system that feels reliable at the moment, as I don't see how a common indexing or search system is possible.

Great to see the discussion, and also great to see the discussion leading to viable ideas

Right now I'm pondering the following solution: Every profile (device) will use a docstore type database, which only the owner can edit and contains both user settings as well as posts. After that there will be a site-wide eventstore database, to which every active user announces their profile's database whenever they load the page: This can be used to get a list of profiles for searches.
eventstore is append-only, so letting everyone write to it is safe. The only way to vandalize that is if an attacker makes a script spamming it constantly and filling it up with junk, as there will have to be a limitation in # of latest entries read per search (eg: 1000 (last active users)) to avoid large sites requiring 10's of MB's to be downloaded each time. I'm not sure how this final risk can be easily prevented.

So far so good. How would you differentiate the user settings from the posts in the docstore db?

I can't easily think of a way, but that is solvable: I definitely want only one database per user, where every post as well as activity is one object. I'll want to index posts by tag, so if I have "foo bar" I can get the results by either "foo" or "bar". I'll probably have a special type field which indicates what the object represents (a post, a profile update, a follow request, etc).

@MirceaKitsune What did you end up going with? :)

I'm not at programming the platform yet, might be months or later. Still need to think about the details, but I'll likely use two databases: DocStore for the profile, append-only Feed to help profiles communicate with one another (for search, notifications, etc).

That sounds good - feel free to re-open this issue or create a new one if you have more questions. Definitely stop back to show us what you made!


Clean up the README.md and CONTRIBUTING.md docs

Use the doctoc program to generate tables of contents, stop referring
to forking and make this the canonical bindgen, move the section on
building to last.
r? @emilio

@bors-servo r+

:pushpin: Commit 78235aa has been approved by emilio

:zap: Test exempted - status


Please add support to http://www.dailymotion.com/old/user/USER

URLs like http://www.dailymotion.com/old/user/LeVisiteurDuFutur/4
Dailymotion is already supported, but it has been forgotten, probably since Dailymotion doesn’t show the feature of putting oldest videos first in its interface (I discovered it casually tweaking URL by hand)…
Also, could you add the option “--playlist-reverse” to the manpage? That could be useful to someone if this occured again without hidden feature showing a reverse list…

Will be fixed in the next version. You can use --playlist-reverse to download in reverse order.


Add GDPR

https://github.com/bakke92/awesome-gdpr#readme
Privacy regulation in Europe.
By submitting this pull request I confirm I've read and complied with the below requirements 🖖
PRs Reviewed:
#1601 comment
#1596 comment
Please read it multiple times. I spent a lot of time on these guidelines and most people miss a lot.
Requirements for your pull request

Don't waste my time. Do a good job, adhere to all the guidelines, and be responsive.

You have to review at least 2 other open pull requests.
Try to prioritize unreviewed PRs, but you can also add more comments to reviewed PRs. Go through the below list when reviewing. This requirement is meant to help make the Awesome project self-sustaining. Comment here which PRs you reviewed. You're expected to put a good effort into this and to be thorough. Look at previous PR reviews for inspiration.

You have read and understood the instructions for creating a list.

This pull request has a title in the format Add Name of List.

✅ Add Swift
✅ Add Software Architecture
❌ Update readme.md
❌ Add Awesome Swift
❌ Add swift
❌ Adding Swift
❌ Added Swift

Your entry here should include a short description about the project/theme of the list. It should not describe the list itself. The first character should be uppercase and the description should end in a dot. It should be an objective description and not a tagline or marketing blurb.

✅ - [iOS](…) - Mobile operating system for Apple phones and tablets.
✅ - [Framer](…) - Prototyping interactive UI designs.
❌ - [iOS](…) - Resources and tools for iOS development.
❌ - [Framer](…)
❌ - [Framer](…) - prototyping interactive UI designs

Your entry should be added at the bottom of the appropriate category.

The suggested Awesome list complies with the below requirements.

Requirements for your Awesome list

Has been around for at least 30 days.That means 30 days from either the first real commit or when it was open-sourced. Whatever is most recent.
Don't open a Draft / WIP pull request while you work on the guidelines. A pull request should be 100% ready and should adhere to all the guidelines when you open it.
Run awesome-lint on your list and fix the reported issues. If there are false-positives or things that cannot/shouldn't be fixed, please report it.
Includes a succinct description of the project/theme at the top of the readme. (Example)

✅ Mobile operating system for Apple phones and tablets.
✅ Prototyping interactive UI designs.
❌ Resources and tools for iOS development.
❌ Awesome Framer packages and tools.

It's the result of hard work and the best I could possibly produce.
If you have not put in considerable effort into your list, your pull request will be immediately closed.
The repo name of your list should be in lowercase slug format: awesome-name-of-list.

✅ awesome-swift
✅ awesome-web-typography
❌ awesome-Swift
❌ AwesomeWebTypography

The heading title of your list should be in title case format: # Awesome Name of List.

✅ # Awesome Swift
✅ # Awesome Web Typography
❌ # awesome-swift
❌ # AwesomeSwift

Non-generated Markdown file in a GitHub repo.
The repo should have awesome-list & awesome as GitHub topics. I encourage you to add more relevant topics.
Not a duplicate. Please search for existing submissions.
Only has awesome items. Awesome lists are curations of the best, not everything.
Includes a project logo/illustration whenever possible.

Either centered, fullwidth, or placed at the top-right of the readme. (Example)
The image should link to the project website or any relevant website.
The image should be high-DPI. Set it to maximum half the width of the original image.

Entries have a description, unless the title is descriptive enough by itself. It rarely is though.
Includes the Awesome badge.

Should be placed on the right side of the readme heading.

Can be placed centered if the list has a centered graphics header.

Should link back to this list.

Has a Table of Contents section.

Should be named Contents, not Table of Contents.
Should be the first section in the list.
Should only have one level of nested lists, preferably none.

Has an appropriate license.

That means something like CC0, not a code licence like MIT, BSD, Apache, etc.
WTFPL and Unlicense are not acceptable licenses.
If you use a license badge, it should be SVG, not PNG.
To verify that you've read all the guidelines, please add comment with just the word unicorn.

Has contribution guidelines.

The file should be named contributing.md. Casing is up to you.

Has consistent formatting and proper spelling/grammar.

The link and description are separated by a dash. Example: - [AVA](…) - JavaScript test runner.
The description starts with an uppercase character and ends with a period.
Consistent and correct naming. For example, Node.js, not NodeJS or node.js.

Doesn't include a Travis badge.You can still use Travis for list linting, but the badge has no value in the readme.
Doesn't include an Inspired by awesome-foo or Inspired by the Awesome project kinda link at the top of the readme. The Awesome badge is enough.

Go to the top and read it again.

unicorn

Your entry here should include a short description about the project/theme of the list. It should not describe the list itself. The first character should be uppercase and the description should end in a dot. It should be an objective description and not a tagline or marketing blurb.
✅ - iOS - Mobile operating system for Apple phones and tablets.
✅ - Framer - Prototyping interactive UI designs.
❌ - iOS - Resources and tools for iOS development.
❌ - Framer
❌ - Framer - prototyping interactive UI designs

Thanks for the feedback, I have updated the entry to describe the theme of the list more thoroughly.

The last link of your TOC is not working

Thanks @Jogai. The wrong link is fixed.

The text in first item in your TOC (Overview of the General Data Protection Regulation) doesn't match the heading it's linked to (Overview of GDPR). I suggest you expand the acronym on the heading to make them match.

Thanks @nglgzz, fixed it as suggested.

I think you can elaborate more in your readme about GDPR than just Privacy regulation in Europe..

Overview of the General Data Protection Regulation This is not the place to elaborate what the acronym means. This should simply be Overview.

The image should link to the project website or any relevant website.

❯ awesome-lint 'https://github.com/bakke92/awesome-gdpr'
✖ Linting

  README.md:9:3
  ✖   9:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  10:1   ToC item "Guidelines" link "#Guidelines" not found    remark-lint:awesome/toc
  ✖  10:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  11:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  12:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  13:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  14:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  15:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  16:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  19:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  20:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  23:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  24:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  27:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  28:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  29:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  30:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  33:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  34:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  35:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  38:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  39:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  40:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  41:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  42:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  42:67  List item description must start with valid casing    remark-lint:awesome/list-item
  ✖  45:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  46:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  47:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  48:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  49:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  50:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  51:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  52:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  56:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  57:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  58:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  59:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  60:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  61:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  62:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  63:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  66:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  67:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  68:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  69:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  70:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  71:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  74:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent
  ✖  75:3   Incorrect indentation before bullet: remove 2 spaces  remark-lint:list-item-bullet-indent

  50 errors

https://github.com/sindresorhus/awesome-lint

Thanks, @sindresorhus!
Updated the description to better describe GDPR.
Changed "Overview" to "Legal text" as this better describes what the content is.
Linked the image to EU website on GDPR.
Fixed linter errors (hopefully all of them as I can't run the linter myself on my computer).

Tweet: https://twitter.com/awesome__re/status/1177083395991453697


Decouple to: Adv/Infinite PageView

Is your feature request related to a problem? Please describe.
Advstory is the best performing video playback package i've used. Preloading and caching second to none. Only issue is that you are kinda forced into the story format and into an opinionated way of navigating and gestures.
Describe the solution you'd like
A simple PageView solution that preloads & caches videos. Then the developers can do whatever they want from that point on. Video playback is a huge pain point in flutter and Advstory solves it but kinda forces you into a certain format.
Describe alternatives you've considered
Hacking advstory. Starting from the ground up.
Additional context
There's a huge community need and you would be a great help. Please check out this thread dedicated to it:
https://www.reddit.com/r/FlutterDev/comments/xpwtdr/coming_together_to_work_on_common_issues_every/
There's always a lot of questions on reddit about this...but no solid solution.
https://www.reddit.com/r/FlutterDev/comments/xou6uu/building_a_videodriven_social_app_with_flutter/

Hi JT, I created this package due to other people's performance issues. This is a complete story view solution. But you can also control almost anything, including gestures. Try adjusting the interceptor to control navigation between stories or contents, or create a story view using 'AdvStory.player' to change the position, size, shape or anything else you want. You can also create your own contents for more customization, this package is really flexible.

Use interceptor:

final _controller = AdvStoryController();

...

_controller.setInterceptor((event) {
  if (event == StoryEvent.nextContent) {
    // User tapped right %23 of screen, prevent content skip and print a log message instead for an example.
    // Or skip to another story, another content etc.
    return () => log(
      'StoryEvent.nextContent blocked and printed this log instead.',
     );
  }

  // Continue default flow for other events.
  return null;
});

Use 'AdvStory.player' to create a specific size story view with rounded edges:

final _controller = AdvStoryPlayerController();

...

ClipRRect(
  borderRadius: BorderRadius.circular(20),
  child: SizedBox(
    width: MediaQuery.of(context).size.width * .5,
    height: MediaQuery.of(context).size.height * .5,
    child: AdvStory.player(
      storyCount: profilePics.length,
      controller: _controller,
      style: const AdvStoryStyle(
        indicatorStyle: IndicatorStyle(
          padding: EdgeInsets.all(8),
        ),
      ),
      storyBuilder: (storyIndex) => Story(
        contentCount: 3,
        contentBuilder: (contentIndex) {
          return SimpleCustomContent(
            builder: (context) {
              return Container(
                color: Colors.blueAccent,
                alignment: Alignment.center,
                child: const Text('😎'),
              );
            },
          );
        },
      ),
    ),
  ),
),

Seems like I need to update docs for use-cases.

Thank you very much :)


chore(package.json): build_test cleans up existing test cases

Description:
This PR makes build_test explicitly clean up existing test case build, to avoid possible confusions such as switching branches, etcs. Individual command chain (npm run build && ...) will allows to work with preserved test build.
Related issue (if exists):

Merged with 9700a51.


feat(text): Adds text cue filter.

This filter is applied to all text cues before they are passed to the text displayer. This gives developers a simple way to apply custom modifications to cues programmatically, such as by setting default css styles, without having to define an entire text displayer plugin just to set these values.

@theodab Why not make a config parameter for this?

@theodab Why not make a config parameter for this?

I went back and forth on whether a config parameter or static variable would make more sense.
I ended up picking the static variable because it was the smaller change, in terms of lines of code. But I guess a config parameter is more consistent with how we have done other filters, so it's more discoverable...
Well, I'll try out the config parameter again.

I don't understand the need for this.  (I'm still catching up on what I missed, though.)


Supergiant should be included under 'Platforms'

Please only report on one project or product per issue
Guidelines for getting added to the CNCF Cloud Native Landscape:

We generally will only list a company in one box, to represent its major or best known offering. We occasionally make exceptions for large companies.
Projects with at least 250 GitHub stars that clearly fit in an existing category are generally included.
We are unlikely to create a new category for products/projects as we'd rather find the best home with the current options.
We are generally not including commercial versions of open source software, when that version just includes minor tweaks.
Closed source products need to link to a clear description of your product; no stealth mode companies.
Your project or company needs a logo.

Project or Product name:
Supergiant
Is it open source? (if you are tempted to say partially, please answer no):
Yes
What are the best URL(s) for it? Repo and homepage (if different) for open source, product homepage for closed source?:
https://supergiant.io/  - https://github.com/supergiant/supergiant
What one category does it best belong in?
'Platforms'
What's the URL for the best logo (and it needs to include the name)?
https://supergiant.io/uploads/files/supergiant-logo.png
Anything else we need to know?:

Thanks for the detail @CommandrAvander , Supergiant will be included in the upcoming 1.0 version!

Closing as this update was included in the most recent version https://github.com/cncf/landscape#current-version


With recent update, it appears we're restricted to only one floating player

Previously, we had the ability to access multiple floating windows. Essentially, with every open tab, I could run the extension and a new floating player opens. Now, when I run/select the extension with an open tab, the existing floating player window is replaced by the new tab's contents.
Would really appreciate correcting this so we're allowed multiple floating players.
Thank you!
Extension version: 2.0.15
Chrome Version 60.0.3112.90
Latest as of Aug 9, 2017
PS -- Hope you don't mind, also shared this issue at the Chrome Extension page.

Hey!
Go to chrome-extension://lcdfgfcmhlhlpcbikdeaholjgknefjgg/options.html
Just uncheck the option "Keep current popup instead of opening a new one"
Have a nice day!

Thanks much, good sir. Works beautifully now
I had no idea the options menu existed, much less the "Keep current popup..." feature was available. Was this a new implementation in version 2.0.15, such that tabs defaulted to separate popups previously?

Actually this was implemented in version 1.9.5 on June 28th. I don't know why it took so long for you to receive the update.


Create contributing.md issue no(#26)

i have created the contributing.md file.

@soham0005 please check the contributing.md file i have added to the repo

Hello @rajatsinghal02 I wanted to share a few suggestions to help improve our CONTRIBUTING.md file and enhance the contribution process. Here are some points to consider:

Duplicate Content:

It would be great to remove the repeated section starting from Contributors Guide for ElectroKart⚡ to keep the document concise.

Branch Naming:

For clarity, I suggest using branch names like feature/<feature_name> or fix/<issue_name>. This will help everyone understand the purpose of the branches at a glance.

Commit Messages:

It might be helpful to encourage the use of descriptive commit messages. For example:    git commit -m "feat: added new feature"
4.Prerequisites Section:
Including a section that lists the required tools (like Node.js and npm versions) could be beneficial for new contributors.
5.Testing:
A friendly reminder to run tests before pushing changes would ensure our code stays robust:  npm run test

Issue Tracker:

It might be useful to ask contributors to assign an issue to themselves before they start working on it. This helps keep track of progress.

PR Descriptions:

Suggesting that contributors include detailed PR descriptions, especially with screenshots for UI changes, could enhance our review process.

Fix Commit Block:

Lastly, we should consider removing the css block around the commit step and instead use a bash block for better clarity.
Thank you all for your hard work and contributions! If you have any questions or thoughts about these suggestions, feel free to reach out. 😊

@PayalKumari10 I have updated all these in a while.

@PayalKumari10 I have updated all these in a while.

Hey @rajatsinghal02 ,
Could you please review the points I shared earlier? Some of them are important to add, while others need correcting in the file. Once these updates are made, I’ll go ahead and merge them into the repository.
Thanks so much for your effort!

@PayalKumari10 File Updated

Hello @rajatsinghal02 , Thank you for solving and updating the issues! Great job! Happy coding, and we look forward to you tackling more challenges with us!

Hi @soham0005 , I have reviewed the changes, and everything looks good.  Could you please merge this PR?
Thank you!
Best,
@PayalKumari10

@rajatsinghal02 please do make the necessary changes to pass all the test cases!


Use pickle for celery for now (bug 1171052)

https://bugzilla.mozilla.org/show_bug.cgi?id=1171052
Should probably add a test, going to let Travis run a full test though.

r+wc


HTTP error code 401 when add hashtags ( initialize_bot.py )

when i run initialize_bot.py and add hashtag this throw me error HTTP error code 401. I tried looking for this error on instaloader but culdn't fix it.
i tried it locally on my pc (with VPN) and VPS
I commented out the line on line 59 in initialize_bot.py
hashtags = get_related_hashtags([hashtag.strip().replace('#', '') for hashtag in hashtags_input.split(',')])
and the bot post a picture with text, as it should be (i think).
error:
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.10/site-packages/instaloader/instaloadercontext.py", line 352, in get_json
    raise ConnectionException("HTTP error code {}.".format(resp.status_code))
instaloader.exceptions.ConnectionException: HTTP error code 401.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/ubuntu/AutoGPT-Social/initialize_bot.py", line 66, in <module>
    main()
  File "/home/ubuntu/AutoGPT-Social/initialize_bot.py", line 59, in main
    hashtags = get_related_hashtags([hashtag.strip().replace('#', '') for hashtag in hashtags_input.split(',')])
  File "/home/ubuntu/AutoGPT-Social/instagram_util/hashtags.py", line 11, in get_related_hashtags
    posts = L.get_hashtag_posts(hashtag)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/instaloader/instaloader.py", line 1187, in get_hashtag_posts
    return Hashtag.from_name(self.context, hashtag).get_posts_resumable()
  File "/home/ubuntu/.local/lib/python3.10/site-packages/instaloader/structures.py", line 1539, in from_name
    hashtag._obtain_metadata()
  File "/home/ubuntu/.local/lib/python3.10/site-packages/instaloader/structures.py", line 1553, in _obtain_metadata
    self._node = self._query({"__a": 1, "__d": "dis"})
  File "/home/ubuntu/.local/lib/python3.10/site-packages/instaloader/structures.py", line 1548, in _query
    json_response = self._context.get_json("explore/tags/{0}/".format(self.name), params)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/instaloader/instaloadercontext.py", line 395, in get_json
    return self.get_json(path=path, params=params, host=host, session=sess, _attempt=_attempt + 1)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/instaloader/instaloadercontext.py", line 395, in get_json
    return self.get_json(path=path, params=params, host=host, session=sess, _attempt=_attempt + 1)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/instaloader/instaloadercontext.py", line 385, in get_json
    raise ConnectionException(error_string) from err
instaloader.exceptions.ConnectionException: JSON Query to explore/tags/it/: HTTP error code 401.

quick fix. if you know which hashtags to use. replace that line with something like this
hashtags = "hashtag1 hashtag2"
do not include # in the hashtags

Yes, I already did that, I just think the problem can happen not only for me. Thanks for reply anyway

I tried, either with , or not within "" and it does not work.

please fix this. I stuck at this level for days. that quick fix didn't work for me.


tour: Change links color

Context: https://tour.golang.org/
Links in the slides are black, as the text, and it's hard to differentiate them.

CC @adg @campoy

(Copied from comment on #13122, sorry for the duplication)
This seems intentional, but I don't understand the intention.
In https://tour.golang.org/static/css/app.css, both the normal
color and text-decoration properties of a elements are suppressed:
a {
color: inherit;
text-decoration: none;
}
/cc: @campoy, this change is made in the tour redesign commit.
https://github.com/golang/tour/commit/4d282f83d3f705f38e724c60a36f48680e90a71e

Agreed links should be easier to see
https://go-review.googlesource.com/17405
Please review


Investigate removing the ManagedZone API

What
Experiment with adding DNSProviderCredentials ref to the DNSPolicy API and removing the need for ManagedZone entirely.

Can we find the right zone to create records in by listener host via the providers API
Can we use the same credential format as is needed by cert-manager

https://github.com/orgs/Kuadrant/discussions/7

POC removing ManagedZones can be found here https://github.com/mikenairn/multi-cluster-traffic-controller/commit/3aa68f8ebef54fcb48c955e3cb8487dbe716d733
The ManagedZones API can be removed fairly easily in favour of listing zones from the current provider. In the POC i completely removed the ManagedZone API but we might want to consider leaving it as it may be useful for testing or more generally to have the ability to easily create new zones as a completely separate piece of functionality.
Main things that needed changed:
DNSPolicy:
apiVersion: kuadrant.io/v1alpha1
kind: DNSPolicy
metadata:
  name: prod-web
  namespace: multi-cluster-gateways
spec:
  targetRef:
    name: prod-web
    group: gateway.networking.k8s.io
    kind: Gateway
  provider:
    secretRef:
      name: mgc-aws-credentials
      namespace: multi-cluster-gateways
    config:
      zoneIDFilter:
        - Z04114632NOABXYWH93QUl

Add provider.secrefRef in order to attach provider credentials directly
Added provider.config to add provider configuration such as zoneIDilter to limit what zones we want to work with from the provider. (More could be added here)

It might be worth considering coming back round to the idea of a separate DNSProvider API if adding more config to a provider is something we want to do. It would also tie in with what cert manager does re. Issuers.
DNSRecord:
apiVersion: kuadrant.io/v1alpha1
kind: DNSRecord
metadata:
  name: myapp.mn.hcpapps.net
  namespace: multi-cluster-gateways
spec:
  provider:
    secretRef:
      name: mgc-aws-credentials
      namespace: multi-cluster-gateways
    config:
      zoneIDFilter:
        - Z04114632NOABXYWH93QU
  zoneId: Z04114632NOABXYWH93QU
  endpoints:
  - dnsName: test1.myapp.mn.hcpapps.net
    recordTTL: 60
    recordType: A
    targets:
    - <IP_ADDRESS>

Add provider field. Copied from the dnspolicy when it creates records.
Add zoneId field, the zone id selected to publish into. (This shouldn't change during dnspolicy reconcile after initial selection)

Note: Moving everything to a DNSProver resource might look better here rather than having to copy the entire thing to the record.
Other changes:

Remove ManagedZone API and controller (TBD, we might decide to leave it as  standalone API).
Add ZoneList to provider interface, needs implemented in each provider.
Update dnsrecord_controller to load provider from it's own spec.
Update dnspolicy_dnsrecords to find a suitable zone by listing zones available from the provider.

Sharing the secret used for dns providers and cert manager issuers shouldn't be an issue. Cert Manager solvers for challenges support setting a secret ref for credentials, and specifying a key to look for in the secret. This seems to be possible for Route53, GoogleDNS and Azure. An example of the Issuer for Route53 using the same secret would be:
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  name: le-staging
spec:
  acme:
    email<EMAIL_ADDRESS>    preferredChain: ""
    privateKeySecretRef:
      name: le-staging
    server: https://acme-staging-v02.api.letsencrypt.org/directory
    solvers:
      - dns01:
          route53:
            hostedZoneID: Z04114632NOABXYWH93QU
            region: us-east-1
            accessKeyIDSecretRef:
              key: AWS_ACCESS_KEY_ID
              name: mgc-aws-credentials
            secretAccessKeySecretRef:
              key: AWS_SECRET_ACCESS_KEY
              name: mgc-aws-credentials

Created follow on task for post mvp https://github.com/Kuadrant/multicluster-gateway-controller/issues/406


How can i post the modal in the specific channel and close the modal ?

Hi! I want to post my modal in a special channel. Currently I'm doing this: modal.guild.channels.cache.get(config.modal).send({ embeds: [embed] }) but, my modal won't close and write "an error occurred . Try again." except that the modal sends well in my channel. Would you help me?

Can u send your Code?

Can u send your Code?

client.on('modalSubmit', (modal) => {     if(modal.customId === 'modal-Discord'){     const firstResponse = modal.getTextInputValue('Text')     const embed = new Discord.MessageEmbed()     .setAuthor({ name: ${modal.user.tag} ➜ ${modal.user.id}, iconURL: modal.user.displayAvatarURL({ dynamic: true }) })     .setDescription(```\n${firstResponse}\n```)     .setImage('https://cdn.discordapp.com/attachments/943240010285592636/943476668662685697/Suggestion.png')     .setColor("#ff7a00")     .setTimestamp()     modal.guild.channels.cache.get(config.modal).send({ embeds: [embed] })     } })

What error do you have on console? Maybe it's because you don't have anything that "closes" the modal like modal.reply() / modal.followUp()...

Heuuu, I never got this error

The modal title has to be 45 or fewer

The modal title has to be 45 or fewer

It's not my code !

But you send this error xd

No :/
Le mer. 4 mai 2022 à 15:35, X_Comatose_X @.***> a
écrit :

Have you solved this problem? But I have this problem - TypeError: Cannot
read properties of undefined (reading 'cache') in
client.channels.cache.get(ID).send(hi);
—
Reply to this email directly, view it on GitHub
https://github.com/Mateo-tem/discord-modals/issues/72#issuecomment-1117322640,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AYQ6FPBHUAWNB6IHDZ77DSLVIJ4KRANCNFSM5TURQRZA
.
You are receiving this because you authored the thread.Message ID:
@.***>

A modal can't be closed with a bot. The bot should reply in order to close it, or the user needs to click on the "Cancel" button.


Update existing file fails - Even possible?

Describe the bug
I want to perform updates to existing files by uploading the data to the already existing fid. The first upload works, but then all following updates will fail with an HTTP error:
System Setup
Running version 1.4.2 on Linux64
./weed master -mdir="master01" -defaultReplication=002
./weed volume -port=8081 -mserver="localhost:9333" -dir="volume01" -max=100
./weed volume -port=8082 -mserver="localhost:9333" -dir="volume02" -max=100
./weed volume -port=8083 -mserver="localhost:9333" -dir="volume03" -max=100
Expected behavior
I would expect that the file upload works like the first with this file. But maybe I'm wrong and the update of an existing file is not possible. An other way would be to assign a new file id for every update and to delete the old.
Sequence
Client:
curl -F file=myFile http://<IP_ADDRESS>:8083/3,02b3f5780c
Response:
{"size":8,"error":"failed to write to replicas for volume 3: [<IP_ADDRESS>:8081]: unexpected end of JSON input\n[<IP_ADDRESS>:8082]: unexpected end of JSON input","eTag":"0ca153a6"}
Master:
No related console output
volume01:
I0809 23:03:11 11674 common.go:73] error writing JSON {Name: Size:8 Error: ETag:0ca153a6} status 304: http: req
volume02:
I0809 23:03:11 11704 common.go:73] error writing JSON {Name: Size:8 Error: ETag:0ca153a6} status 304: http: request method or response status code does not allow body
volume03:
I0809 23:03:11 11688 upload_content.go:136] failing to read upload response http://<IP_ADDRESS>:8081/3,02b3f5780c?ts=1565384591&ttl=&type=replicate
I0809 23:03:11 11688 upload_content.go:136] failing to read upload response http://<IP_ADDRESS>:8082/3,02b3f5780c?ts=1565384591&ttl=&type=replicate

Thank you!

You only need to upload to one volume server, which will automatically replicate the file to other volume servers.

The status code is 304, meaning there are no change detected.

Recommended way is to "assign a new file id for every update and to delete the old".


Unable to find method to scroll the wpf element in windows 10

I am looking to scroll a wpf list item element. I am not finding a method to scroll the element into view. Can somebody help on this

if it shows in inspect.exe then win app driver has auto scroll feature enabled. Use any of the methods to find the element.

I am using UIA to scroll an element but how to scroll to the element in Win App driver

I mean. we have ScrollToView pattern in UIA. I am looking similar to that


Add missing limits header

Fixes #3

Thank you. This change has been merged in the internal repository and will be pushed with the next release.


Fix issue 14433 - std.encoding does not support Central European ISO-8859-2 and CP1250 encodings

This is my first pull so I hope its done right ;-)
I just added support for both encodings in a same style as current encodings are.
I came across some spacing issues so fixed them too and can't figure what was cast(string) for in:
return
[
    cast(string)
    "CP819",
    "IBM819",
    "ISO-8859-1"
]

so removed it too.
Issue 14433

For future reference, it's easier to review if you put the formatting changes in a separate commit.

Comment tags was copy pasted so I removed them from all encodings.
About BOM - I checked other phobos files and they are mix of ASCII and UTF8 without BOM so I removed it too.
Maybe it should be mentioned here? http://wiki.dlang.org/Pull_Requests

I've baked better tests with more possible solutions here: http://pastebin.com/C6jDYzw0
Algorithms used:

Array - currently used slow method - O(n)
AA - use of associative array as a map
IF - simple and ugly generated chain of IFs
RBT - use Red Black Tree as character map
BS - use simple binary search over sorted array
BST - use binary search tree encoded to immutable array

I think that AA is the most elegant one, but currently not as performant as RBT or BST.
I would preffer BST array search because of its simplicity.
So please advice which way to go, I'll then modify current pull and create the other one to change current encodings the same way.
Results on my linux machine are:
DMD

Algorithm
Duration

Array
4 secs, 144 ms, 239 μs, and 6 hnsecs

AA
1 sec, 408 ms, 367 μs, and 4 hnsecs

IF
1 sec, 113 ms, and 779 μs

RBT
1 sec, 320 ms, 87 μs, and 3 hnsecs

BS
1 sec, 444 ms, 894 μs, and 7 hnsecs

BST
1 sec, 295 ms, 103 μs, and 1 hnsec

GDC

Algorithm
Duration

Array
4 secs, 415 ms, 200 μs, and 6 hnsecs

AA
848 ms, 581 μs, and 3 hnsecs

IF
843 ms and 503 μs

RBT
398 ms and 407 μs

BS
739 ms, 749 μs, and 5 hnsecs

BST
422 ms, 399 μs, and 6 hnsecs

LDC2

Algorithm
Duration

Array
2 secs, 176 ms, 820 μs, and 8 hnsecs

AA
771 ms, 346 μs, and 1 hnsec

IF
535 ms and 60 μs

RBT
474 ms and 487 μs

BS
400 ms, 19 μs, and 9 hnsecs

BST
524 ms, 759 μs, and 8 hnsecs

I think BST is probably the way to go: reasonable performance, and reasonably simple implementation. If performance becomes a problem in the future, then we can consider how to improve it. Let's not get stuck on performance, because the functionality is more important right now.

I've updated the PR with in array binary search tree implementation to find right value for dchar. Other way around stays the same O(1).
I used simple generation utility from unicode mappings spec files to Encoder template so it would be easier to change it as required and safer for human errors.
After this gets accepted, I'll try to speed up the original encodings the same way too and even add some other encodings with it.
Sources for the utility: https://github.com/chalucha/encgen

You might have done git pull --rebase against your own branch. Correct way would be git pull --rebase upstream master.
This seems solid but std.encoding is generally considered crappy and up for replacement.
Anyway I'd merge it if:

there are no merge commits and other crap
most symobls are made private unless meant for the end-user

Remade it in #3626 for clean up..


Documentation of style differences between 5, 6 and 7

Bug, feature request, or proposal:
Question - is there documentation showing / describing the style differences between Angular 5, 6 and 7?
Echoing the concerns in #13625, I need to estimate effort for moving to Angular 7 from 5.
We are utilizing custom themes where business requirements cause us to override default Material Design guide recommendations.
What is the expected behavior?
Documentation of changes across versions.
What is the current behavior?
Unknown - is there such documentation? I have not been able to find this information at material.io, material.angular.io or this github repo.
What are the steps to reproduce?
This is just a question / request for documentation.
What is the use-case or motivation for changing an existing behavior?
No change is being requested.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 5 with desire to move to Angular 7. Chrome 70 is currently in use by our users.
Is there anything else we should know?
I want to echo the concerns raised in #13625. I do understand the arguments from the dev team, and agree with them. I want smaller bundle sizes and improved maintainability so you can more easily continue to produce this wonderful product.
But please keep in mind that as more people (especially enterprise customers) rely on the library we need help from you to enable us to justify the cost of upgrades to those who control our budgets.
Thanks for the hard work. @angular/material has come a long way ...

The canonical place for discovering changes like this is the changelog. I agree that it's not not robust, other than notes like "Updated to match 2018 spec".
Going forward, what would be the most useful way to present this information?

I am not sure.
I do not think a visual format would be feasible although that would be ideal.
Perhaps a one-pager that describes the items changing. We could use that as a checklist to go to the individual pages in the material.angular.io site for visual reference of current state.
But. as you can tell, wading through the change log is very difficult as a means for gleaning this information.
I only see this one line in the 7.0.0 release notes and no links for further details:
Updated component styles throughout the library matching the 2018 Material Design Spec refresh.
And I think that is the right level of detail for release notes.
But as I pointed out, it is not obvious where on the material.io site where to find that information either. note, I will open a separate incident with them if required.
If they had a What's New page you could just link to it maybe.
I am sure you have much more creative folks on your team than me. So I will defer to your best judgement.
Mainly wanted you to be aware of the need.

Going forward for major versions, we'll work on making the specific changes more clear and digestible. Closing since there's no direct action to take right now.


[DO NOT MERGE] Add Coveo headless as ESM

Please always provide the Jira Issue your PR is for, as well as test URLs where your change can be observed (before and after):
Jira ID:
Test URLs:

Before: https://main--exlm--adobe-experience-league.hlx.page/docs/integrations-learn/experience-cloud/solution-categories/content-management
After: https://feature-coveo-headless--exlm--adobe-experience-league.hlx.page/docs/integrations-learn/experience-cloud/solution-categories/content-management

@ahmed-musallam We've taken this code and added this as part of Browse-results. Pls review.
https://github.com/adobe-experience-league/exlm/pull/251


Mobile wallet Login screen, UI corrections.

Description:
In the Mobile wallet Login screen, the following corrections are needed.

The Label "Login" is not required. ( Note: In Desktop wallet, we don't have "Login" Label.)
"Open wallet" button size should be small.

Please refer to the below screenshot for more details.

Verified with the latest build, hence closing this ticket.


[FLINK-11715][table-planner-blink] Add optimize program to organize optimization phases

What is the purpose of the change
This commit adds optimize program to organize optimization phases.
Currently, Flink organizes the optimization phases by different methods in Batch(Stream)TableEnvironment#optimize. However this is not easy to extend especially there are more than ten optimization stages in Blink.
So in Blink, each optimization stage is abstracted into a FlinkOptimizeProgram, and FlinkChainedPrograms is responsible for organizing all the programs.
Brief change log

Adds FlinkOptimizeProgram interface, and its common subclasses: FlinkRuleSetProgram, FlinkHepRuleSetProgram, FlinkVolcanoProgram, FlinkGroupProgram
Adds FlinkChainedPrograms for organizing all the programs

Verifying this change
This change added tests and can be verified as follows:

Added test that validates all operations to build a FlinkOptimizeProgram and FlinkChainedPrograms

Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
The serializers: (no)
The runtime per-record code paths (performance sensitive): (no)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
The S3 file system connector: (no)

Documentation

Does this pull request introduce a new feature? (yes)
If yes, how is the feature documented? (JavaDocs)

@flinkbot approve all

@flinkbot disapprove all

merging this...


Assertions crashes

Had some crashes with an app built on iOS7.1 when running on iOS8.
Looks like that UITableViewHeaderFooterView inner workings has changed in iOS8 (see #148), which resulted in assertions errors in NSObject+PXSubclass.m:63 :
if (![object isKindOfClass:[self superclass]]) {
    NSAssert(NO, @"Class %@ doesn't fit for subclassing.", [superClass description]);
    return;
}

Assertions = Exceptions = Crash if uncaught. A common practice in iOS/OSX development is simply to disable assertions at release, in order to avoid such crashes.
Just adding OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; to the Release configuration and generating the framework using ./scripts/build_framework.sh -c Release solves these potentials unwanted assertions crashs.

I just had the same issue..but working with Xamarin... any idea?

I know it's been 2+ years, but did anyone find a fix?

Freestyle is officially dead. I have a project that is based on this one that includes fixes for the latest iOS https://github.com/StylingKit/StylingKit

@anton-matosov - Pixate freestyle crashes on ios 11 beta 10, Can i use https://github.com/StylingKit/StylingKit ? without code level changes ?

iOS 11 crash fix is available in the branch feature/PhotoUICompat, not released yet
use pod "StylingKit", :git => "https://github.com/StylingKit/StylingKit.git", :branch => "feature/PhotoUICompat" to install

I will try to release it as hotfix sometime soon

Thank you.
On Mon, Sep 11, 2017 at 4:07 AM, Anton Matosov<EMAIL_ADDRESS>wrote:

I will try to release it as hotfix sometime soon
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Pixate/pixate-freestyle-ios/issues/152#issuecomment-328377154,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFbRvj3mDjRjev4cJbq8Oq3O9aYQt_txks5shGSngaJpZM4CoRhb
.

--
Regards,
Vinoth Arunagiri,
+91-805-618-8894

You are welcome.
Please feel free to reach me out
Either on StylingKit issues page https://github.com/StylingKit/StylingKit/issues
Or via StylingKit Slack https://stylingkit-slackin.herokuapp.com/

Hi Anton,
Still the branch feature/PhotoUICompat available ?
On Mon, Sep 11, 2017 at 4:06 AM, Anton Matosov<EMAIL_ADDRESS>wrote:

iOS 11 crash fix is available in the branch feature/PhotoUICompat, not
released yet
use pod "StylingKit", :git => "https://github.com/
StylingKit/StylingKit.git", :branch => "feature/PhotoUICompat" to install
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Pixate/pixate-freestyle-ios/issues/152#issuecomment-328377123,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFbRvtOHjWyY8f3rMBq9GbB1DpV0tv64ks5shGR8gaJpZM4CoRhb
.

--
Regards,
Vinoth Arunagiri,
+91-805-618-8894

Hi @vinothbtechit
This fix is in the latest release. No need for this branch anymore.

Hi Anton,
0.4.3 is the latest release right ?

On 01-May-2018, at 12:05 AM, Anton Matosov<EMAIL_ADDRESS>wrote:
Hi @vinothbtechit
This fix is in the latest release. No need for this branch anymore.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Correct. You can see all releases and release notes here https://github.com/StylingKit/StylingKit/releases


Don't assume we have correct JSON at edit time

Description
Allow the usage of JMeter variables in all user definable parameters for GraphQL Sampler.
Motivation and Context
When JMeter variables are used inside variable or query blocks for the
GraphQL Sampler, we cannot assume, that we still have valid JSON as
long those variables are not rendered. The rendering of the variables
is done at a later time in the life cycle. Therefore, we have to do
our best to render JSON without actually checking the validity.
Bugzilla Id: 65108
How Has This Been Tested?
Test case has been added
Screenshots (if appropriate):
Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist:

[x] My code follows the code style of this project.
[ ] I have updated the documentation accordingly.

@woonsan What do you think of this change?

Superceeded by #660


docs: add IBC testing steps to dev guide

Condense the testing steps described in #3043 & add these to the developer section of the Penumbra guide under a new subsection

Post release of 61, we manually created a new channel from the Penumbra testnet to the Osmosis testnet. We'll need to publish the channel info emitted by Hermes in our docs for people to make use of it:
# Chain: penumbra-testnet-dione
 - Client: 07-tendermint-2
   * Connection: connection-18
      | State: OPEN
      | Counterparty state: OPEN
      + Channel: channel-0
        | Port: transfer
        | State: OPEN
        | Counterparty: channel-1759
# Chain: osmo-test-5
  - Client: 07-tendermint-1066
    * Connection: connection-975
      | State: OPEN
      | Counterparty state: OPEN
      + Channel: channel-1759
        | Port: transfer
        | State: OPEN
        | Counterparty: channel-0

Having #2937 in place would be nice, but not a blocker.

Discussed with @aubrika: since I recently ran through these steps, setting up Hermes on 61, I'm going to grab this docs ticket. Will tag @aubrika for review, to make sure the steps are legible.


When plans are present, no other search results appear besides the plan

Beaurepaire-Rohan, for example, prevents any other results from being returned via click or search-box.

Is this still happening? I can't replicate the issue.

Not happening for me any more! Although, I now get other results (e.g., roads, buildings), I don't get maps and plans as results via click or box search. They only come in via text search, as shown in your example. Is that by design? I can't remember any reason why we wouldn't display them after any type of search.

I believe this is a back-end issue--if any of those results came through from the API they would be displayed.

This is by design. The hit area for those things are so large it doesn't make sense to have them show up in a click search.


feat: allow to decide if NIO flush should also recover from error

Codecov Report

Merging #81 into master will decrease coverage by 0.61%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #81      +/-   ##
==========================================
- Coverage   77.07%   76.45%   -0.62%
==========================================
  Files          29       29
  Lines        1217     1219       +2
==========================================
- Hits          938      932       -6
- Misses        279      287       +8

Impacted Files
Coverage Δ

Sources/AWSXRayRecorder/Recorder+NIO.swift
94.28% <100.00%> (+0.34%)
:arrow_up:

Sources/AWSXRayUDPEmitter/Config.swift
93.33% <0.00%> (-6.67%)
:arrow_down:

...rces/AWSXRayRecorder/AnyCodable/AnyEncodable.swift
62.09% <0.00%> (-4.84%)
:arrow_down:

Sources/AWSXRayRecorder/Config.swift
95.45% <0.00%> (-4.55%)
:arrow_down:

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 6114590...d221d43. Read the comment docs.


Request: hyperlink (HTML-like anchor)

How it looks.

Originally, I was waiting for the main repo to implement this feature, but it appears unmaintained and nu-ansi-term is the second most popular ANSI crate, so I open an issue here.

Good call! We have been manually doing that in nushell for a while. If it fits with the ansi-term API, we would definitely be happy to have that in this crate.

This has been implemented by #43


The program reach the max of typing

Dear  Pascal,
I have got the error message likes the following when I used parseHLADbAlignment function, can you give me some advice on how to avoid this error message?

I'm looking forward to your reply.
Best,
Du

Hi Du,
Which version of HLA db was used to do the typing? I suspect that it is a more recent version that the one present in the software.
Best.
Astrid

Dear Astrid,
The corresponding information for the HLA db version I am using is as follows, how should I overcome this problem?
# file: Allelelist_history.txt
# date: 2022-04-12
# version: IPD-IMGT/HLA 3.48.0
# origin: https://github.com/ANHIG/IMGTHLA/Allelelist_history.txt
# repository: https://raw.githubusercontent.com/ANHIG/IMGTHLA/Latest/Allelelist_history.txt
Best,
Du

Hi Du,
I am sorry for delay, we will give you news soon.
Best,
Pascal


Add env.json

What
Add env.json and use it for generating the macro_rule table that is used for generating the environment host interface and interface implementations.
Why
There are a lot of host functions.
There are so many that we use macro_rules to code generate most of the code relating to them in our Rust crates.
Unfortunately macro_rules doesn't help us code generate things that aren't Rust, like documentation, or non-Rust SDKs, or tools.
If we have any hope of developers building alternative non-Rust SDKs, we need to provide some things like the functions that SDKs need to extern reference in a way that will allow them to code generate. In a similar way we code generate today in the Rust crates.
JSON is accessible to everyone, and there are plenty of tools for it.
I considered a couple approaches to this change:

Generating a .json file from the macro_rules.
Generating the macro_rules from a .json file. (this PR)
Doing all interface codegen using proc-macros, which would be a massive departure from our current code infrastructure, so I did not consider it seriously.

I initially wanted to do (1), however macro_rules cannot do things like write files. Only proc-macros can. So it was more practical to do (2) and generate the existing macro_rules from a .json file.
This makes the JSON file the source of truth. If we're adding new host functions, we should add them to the JSON file and rebuild.
This proc-macro generates the existing macro_rule, the same as what used to be there. Here is a snapshot of the generated code:
#[doc(hidden)] #[macro_export] macro_rules!
_call_macro_with_all_host_functions
{
    { $macro_to_call_back : ident } =>
    {
        $macro_to_call_back!
        {
            mod context "x"
            {
                #[doc =
                "This one variant of logging does not take a format string and is live in both Env=Guest and Env=Host configurations."]
                { "_", fn log_value(v : RawVal) -> RawVal }
                #[doc =
                "Get the contractID `Bytes` of the contract which invoked the running contract. Traps if the running contract was not invoked by a contract."]
                { "0", fn get_invoking_contract() -> Object } #[doc = ""]
                { "1", fn obj_cmp(a : RawVal, b : RawVal) -> i64 }
                #[doc =
                "Records a contract event. `topics` is expected to be a `SCVec` with length <= 4 that cannot contain `Vec`, `Map`, or `Bytes` with length > 32 On success, returns an `SCStatus::Ok`."]
                {
                    "2", fn contract_event(topics : Object, data : RawVal) ->
                    RawVal
                }
                #[doc =
                "Get the contractID `Bytes` of the contract which invoked the running contract. Traps if the running contract was not invoked by a contract."]
                { "3", fn get_current_contract() -> Object }
                #[doc =
                "Return the protocol version of the current ledger as a u32."]
                { "4", fn get_ledger_version() -> RawVal }
                #[doc =
                "Return the sequence number of the current ledger as a u32."]
                { "5", fn get_ledger_sequence() -> RawVal }
                #[doc =
                "Return the timestamp number of the current ledger as a u64."]
                { "6", fn get_ledger_timestamp() -> Object }
                #[doc =
                "Return the network passphrase of the current ledger as `Bytes`."]
                { "7", fn get_ledger_network_passphrase() -> Object }
                #[doc =
                "Returns the full call stack from the first contract call to the current one as a vector of vectors, where the inside vector contains the contract id as Hash, and a function as a Symbol."]
                { "8", fn get_current_call_stack() -> Object }
                #[doc =
                "Causes the currently executing contract to fail immediately with a provided status code, which must be of error-type `ScStatusType::ContractError`. Does not actually return."]
                { "9", fn fail_with_status(status : Status) -> RawVal }
                #[doc =
                "Record a debug event. Fmt must be a Bytes. Args must be a Vec. Void is returned."]
                {
                    "a", fn log_fmt_values(fmt : Object, args : Object) ->
                    RawVal
                }
                #[doc =
                "Get whether the contract invocation is from an account or another contract. Returns 0 for account, 1 for contract."]
                { "b", fn get_invoker_type() -> u64 }
                #[doc =
                "Get the AccountID object type of the account which invoked the running contract. Traps if the running contract was not invoked by an account."]
                { "c", fn get_invoking_account() -> Object }
                #[doc =
                "Return the network id (sha256 hash of network passphrase) of the current ledger as `Bytes`. The value is always 32 bytes in length."]
                { "d", fn get_ledger_network_id() -> Object }
            } mod i64 "i"
            {
                #[doc = "Convert a u64 to an object containing a u64."]
                { "_", fn obj_from_u64(v : u64) -> Object }
                #[doc = "Convert an object containing a i64 to a u64."]
                { "0", fn obj_to_u64(obj : Object) -> u64 }
                #[doc = "Convert an i64 to an object containing an i64."]
                { "1", fn obj_from_i64(v : i64) -> Object }
                #[doc = "Convert an object containing an i64 to an i64."]
                { "2", fn obj_to_i64(obj : Object) -> i64 }
                #[doc =
                "Convert the low and high 64-bit words of a u128 to an object containing a u128."]
                { "5", fn obj_from_u128_pieces(lo : u64, hi : u64) -> Object }
                #[doc =
                "Extract the low 64 bits from an object containing a u128."]
                { "6", fn obj_to_u128_lo64(obj : Object) -> u64 }
                #[doc =
                "Extract the high 64 bits from an object containing a u128."]
                { "7", fn obj_to_u128_hi64(obj : Object) -> u64 }
                #[doc =
                "Convert the lo and hi 64-bit words of an i128 to an object containing an i128."]
                { "8", fn obj_from_i128_pieces(lo : u64, hi : u64) -> Object }
                #[doc =
                "Extract the low 64 bits from an object containing an i128."]
                { "9", fn obj_to_i128_lo64(obj : Object) -> u64 }
                #[doc =
                "Extract the high 64 bits from an object containing an i128."]
                { "a", fn obj_to_i128_hi64(obj : Object) -> u64 }
            } mod map "m"
            {
                #[doc = "Create an empty new map."]
                { "_", fn map_new() -> Object }
                #[doc =
                "Insert a key/value mapping into an existing map, and return the map object handle. If the map already has a mapping for the given key, the previous value is overwritten."]
                {
                    "0", fn map_put(m : Object, k : RawVal, v : RawVal) ->
                    Object
                }
                #[doc =
                "Get the value for a key from a map. Traps if key is not found."]
                { "1", fn map_get(m : Object, k : RawVal) -> RawVal }
                #[doc =
                "Remove a key/value mapping from a map if it exists, traps if doesn't."]
                { "2", fn map_del(m : Object, k : RawVal) -> Object }
                #[doc = "Get the size of a map."]
                { "3", fn map_len(m : Object) -> RawVal }
                #[doc =
                "Test for the presence of a key in a map. Returns (SCStatic) TRUE/FALSE."]
                { "4", fn map_has(m : Object, k : RawVal) -> RawVal }
                #[doc =
                "Given a key, find the first key less than itself in the map's sorted order. If such a key does not exist, return an SCStatus containing the error code (TBD)."]
                { "5", fn map_prev_key(m : Object, k : RawVal) -> RawVal }
                #[doc =
                "Given a key, find the first key greater than itself in the map's sorted order. If such a key does not exist, return an SCStatus containing the error code (TBD)."]
                { "6", fn map_next_key(m : Object, k : RawVal) -> RawVal }
                #[doc =
                "Find the minimum key from a map. If the map is empty, return an SCStatus containing the error code (TBD)."]
                { "7", fn map_min_key(m : Object) -> RawVal }
                #[doc =
                "Find the maximum key from a map. If the map is empty, return an SCStatus containing the error code (TBD)."]
                { "8", fn map_max_key(m : Object) -> RawVal }
                #[doc =
                "Return a new vector containing all the keys in a map. The new vector is ordered in the original map's key-sorted order."]
                { "9", fn map_keys(m : Object) -> Object }
                #[doc =
                "Return a new vector containing all the values in a map. The new vector is ordered in the original map's key-sorted order."]
                { "A", fn map_values(m : Object) -> Object }
            } mod vec "v"
            {
                #[doc =
                "Creates a new vector with an optional capacity hint `c`. If `c` is `ScStatic::Void`, no hint is assumed and the new vector is empty. Otherwise, `c` is parsed as an `u32` that represents the initial capacity of the new vector."]
                { "_", fn vec_new(c : RawVal) -> Object }
                #[doc =
                "Update the value at index `i` in the vector. Return the new vector. Trap if the index is out of bounds."]
                {
                    "0", fn vec_put(v : Object, i : RawVal, x : RawVal) ->
                    Object
                }
                #[doc =
                "Returns the element at index `i` of the vector. Traps if the index is out of bound."]
                { "1", fn vec_get(v : Object, i : RawVal) -> RawVal }
                #[doc =
                "Delete an element in a vector at index `i`, shifting all elements after it to the left. Return the new vector. Traps if the index is out of bound."]
                { "2", fn vec_del(v : Object, i : RawVal) -> Object }
                #[doc = "Returns length of the vector."]
                { "3", fn vec_len(v : Object) -> RawVal }
                #[doc = "Push a value to the front of a vector."]
                { "4", fn vec_push_front(v : Object, x : RawVal) -> Object }
                #[doc =
                "Removes the first element from the vector and returns the new vector. Traps if original vector is empty."]
                { "5", fn vec_pop_front(v : Object) -> Object }
                #[doc = "Appends an element to the back of the vector."]
                { "6", fn vec_push_back(v : Object, x : RawVal) -> Object }
                #[doc =
                "Removes the last element from the vector and returns the new vector. Traps if original vector is empty."]
                { "7", fn vec_pop_back(v : Object) -> Object }
                #[doc =
                "Return the first element in the vector. Traps if the vector is empty"]
                { "8", fn vec_front(v : Object) -> RawVal }
                #[doc =
                "Return the last element in the vector. Traps if the vector is empty"]
                { "9", fn vec_back(v : Object) -> RawVal }
                #[doc =
                "Inserts an element at index `i` within the vector, shifting all elements after it to the right. Traps if the index is out of bound"]
                {
                    "A", fn vec_insert(v : Object, i : RawVal, x : RawVal) ->
                    Object
                }
                #[doc =
                "Clone the vector `v1`, then moves all the elements of vector `v2` into it. Return the new vector. Traps if number of elements in the vector overflows a u32."]
                { "B", fn vec_append(v1 : Object, v2 : Object) -> Object }
                #[doc =
                "Copy the elements from `start` index until `end` index, exclusive, in the vector and create a new vector from it. Return the new vector. Traps if the index is out of bound."]
                {
                    "C", fn vec_slice(v : Object, start : RawVal, end : RawVal)
                    -> Object
                }
                #[doc =
                "Get the index of the first occurrence of a given element in the vector. Returns the u32 index of the value if it's there. Otherwise, it returns `ScStatic::Void`."]
                {
                    "D", fn vec_first_index_of(v : Object, x : RawVal) -> RawVal
                }
                #[doc =
                "Get the index of the last occurrence of a given element in the vector. Returns the u32 index of the value if it's there. Otherwise, it returns `ScStatic::Void`."]
                {
                    "E", fn vec_last_index_of(v : Object, x : RawVal) -> RawVal
                }
                #[doc =
                "Binary search a sorted vector for a given element. If it exists, the high-32 bits of the return value is 0x0001 and the low-32 bits contain the u32 index of the element. If it does not exist, the high-32 bits of the return value is 0x0000 and the low-32 bits contain the u32 index at which the element would need to be inserted into the vector to maintain sorted order."]
                { "F", fn vec_binary_search(v : Object, x : RawVal) -> u64 }
            } mod ledger "l"
            {
                #[doc = ""]
                {
                    "_", fn put_contract_data(k : RawVal, v : RawVal) -> RawVal
                } #[doc = ""]
                { "0", fn has_contract_data(k : RawVal) -> RawVal }
                #[doc = ""]
                { "1", fn get_contract_data(k : RawVal) -> RawVal }
                #[doc = ""]
                { "2", fn del_contract_data(k : RawVal) -> RawVal }
                #[doc =
                "Deploys a contract from the current contract. `wasm_hash` must be a hash of the contract code that has already been installed on this network. `salt` is used to create a unique contract id."]
                {
                    "3", fn
                    create_contract_from_contract(wasm_hash : Object, salt :
                    Object) -> Object
                }
                #[doc =
                "Deploys a built-in token contract from the current contract. `salt` is used to create a unique contract id for the token."]
                {
                    "4", fn create_token_from_contract(salt : Object) -> Object
                }
            } mod call "d"
            {
                #[doc =
                "Calls a function in another contract with arguments contained in vector `args`. If the call is successful, forwards the result of the called function. Traps otherwise."]
                {
                    "_", fn
                    call(contract : Object, func : Symbol, args : Object) ->
                    RawVal
                }
                #[doc =
                "Calls a function in another contract with arguments contained in vector `args`. Returns: - if successful, result of the called function. - otherwise, an `SCStatus` containing the error status code."]
                {
                    "0", fn
                    try_call(contract : Object, func : Symbol, args : Object) ->
                    RawVal
                }
            } mod bytes "b"
            {
                #[doc =
                "Serializes an (SC)Val into XDR opaque `Bytes` object."]
                { "_", fn serialize_to_bytes(v : RawVal) -> Object }
                #[doc =
                "Deserialize a `Bytes` object to get back the (SC)Val."]
                { "0", fn deserialize_from_bytes(b : Object) -> RawVal }
                #[doc =
                "Copies a slice of bytes from a `Bytes` object specified at offset `b_pos` with length `len` into the linear memory at position `lm_pos`. Traps if either the `Bytes` object or the linear memory doesn't have enough bytes."]
                {
                    "1", fn
                    bytes_copy_to_linear_memory(b : Object, b_pos : RawVal,
                    lm_pos : RawVal, len : RawVal) -> RawVal
                }
                #[doc =
                "Copies a segment of the linear memory specified at position `lm_pos` with length `len`, into a `Bytes` object at offset `b_pos`. The `Bytes` object may grow in size to accommodate the new bytes. Traps if the linear memory doesn't have enough bytes."]
                {
                    "2", fn
                    bytes_copy_from_linear_memory(b : Object, b_pos : RawVal,
                    lm_pos : RawVal, len : RawVal) -> Object
                }
                #[doc =
                "Constructs a new `Bytes` object initialized with bytes copied from a linear memory slice specified at position `lm_pos` with length `len`."]
                {
                    "3", fn
                    bytes_new_from_linear_memory(lm_pos : RawVal, len : RawVal)
                    -> Object
                } #[doc = "Create an empty new `Bytes` object."]
                { "4", fn bytes_new() -> Object }
                #[doc =
                "Update the value at index `i` in the `Bytes` object. Return the new `Bytes`. Trap if the index is out of bounds."]
                {
                    "5", fn bytes_put(b : Object, i : RawVal, u : RawVal) ->
                    Object
                }
                #[doc =
                "Returns the element at index `i` of the `Bytes` object. Traps if the index is out of bound."]
                { "6", fn bytes_get(b : Object, i : RawVal) -> RawVal }
                #[doc =
                "Delete an element in a `Bytes` object at index `i`, shifting all elements after it to the left. Return the new `Bytes`. Traps if the index is out of bound."]
                { "7", fn bytes_del(b : Object, i : RawVal) -> Object }
                #[doc = "Returns length of the `Bytes` object."]
                { "8", fn bytes_len(b : Object) -> RawVal }
                #[doc =
                "Appends an element to the back of the `Bytes` object."]
                { "9", fn bytes_push(b : Object, u : RawVal) -> Object }
                #[doc =
                "Removes the last element from the `Bytes` object and returns the new `Bytes`. Traps if original `Bytes` is empty."]
                { "A", fn bytes_pop(b : Object) -> Object }
                #[doc =
                "Return the first element in the `Bytes` object. Traps if the `Bytes` is empty"]
                { "B", fn bytes_front(b : Object) -> RawVal }
                #[doc =
                "Return the last element in the `Bytes` object. Traps if the `Bytes` is empty"]
                { "C", fn bytes_back(b : Object) -> RawVal }
                #[doc =
                "Inserts an element at index `i` within the `Bytes` object, shifting all elements after it to the right. Traps if the index is out of bound"]
                {
                    "D", fn bytes_insert(b : Object, i : RawVal, u : RawVal) ->
                    Object
                }
                #[doc =
                "Clone the `Bytes` object `b1`, then moves all the elements of `Bytes` object `b2` into it. Return the new `Bytes`. Traps if its length overflows a u32."]
                { "E", fn bytes_append(b1 : Object, b2 : Object) -> Object }
                #[doc =
                "Copies the elements from `start` index until `end` index, exclusive, in the `Bytes` object and creates a new `Bytes` from it. Returns the new `Bytes`. Traps if the index is out of bound."]
                {
                    "F", fn
                    bytes_slice(b : Object, start : RawVal, end : RawVal) ->
                    Object
                }
            } mod hash "h"
            {
                #[doc = ""] { "_", fn hash_from_bytes(x : Object) -> Object }
                #[doc = ""] { "0", fn hash_to_bytes(x : Object) -> Object }
            } mod key "k"
            {
                #[doc = ""]
                { "_", fn public_key_from_bytes(x : Object) -> Object }
                #[doc = ""]
                { "0", fn public_key_to_bytes(x : Object) -> Object }
            } mod crypto "c"
            {
                #[doc = ""]
                { "_", fn compute_hash_sha256(x : Object) -> Object }
                #[doc = ""]
                {
                    "0", fn
                    verify_sig_ed25519(x : Object, k : Object, s : Object) ->
                    RawVal
                }
            } mod account "a"
            {
                #[doc =
                "Get the low threshold for the account with ID `a` (`a` is `AccountId`). Traps if no such account exists."]
                { "_", fn account_get_low_threshold(a : Object) -> RawVal }
                #[doc =
                "Get the medium threshold for the account with ID `a` (`a` is `AccountId`). Traps if no such account exists."]
                { "0", fn account_get_medium_threshold(a : Object) -> RawVal }
                #[doc =
                "Get the high threshold for the account with ID `a` (`a` is `AccountId`). Traps if no such account exists."]
                { "1", fn account_get_high_threshold(a : Object) -> RawVal }
                #[doc =
                "Get the signer weight for the signer with ed25519 public key `s` (`s` is `Bytes`) on the account with ID `a` (`a` is `AccountId`). Returns the master weight if the signer is the master, and returns 0 if no such signer exists. Traps if no such account exists."]
                {
                    "2", fn account_get_signer_weight(a : Object, s : Object) ->
                    RawVal
                }
                #[doc =
                "Given an ID `a` (`a` is `AccountId`) of an account, check if it exists. Returns (SCStatic) TRUE/FALSE."]
                { "3", fn account_exists(a : Object) -> RawVal }
            } mod test "t"
            {
                #[doc =
                "A dummy function taking 0 arguments and performs no-op. This function is for test purpose only, for measuring the roundtrip cost of invoking a host function, i.e. host->Vm->host."]
                { "_", fn dummy0() -> RawVal }
            }
        }
    } ;
}

There are some downside to loading files in proc-macros.
The Rust compiler will not always determine if the files need to trigger a rebuild of the proc-macro. Because of this you might edit the JSON file and not see a change. Running cargo clean will always resolve this. This is a bit inconvenient, but given that we don't add host functions everyday, I think this is an okay tradeoff.

@dmkozh :nod: That's a great point.
I guess this is somewhat similar to XDR. For the longest time XDR lived in the stellar-core repo, and for the most part that was fine, but it was inconvenient at times.
I'm inclined to keep the file here in the short term, because there are advantages – process optimizations mostly – to keeping things that change together, together. But over time it will be even more important that this file is discoverable, and versionable really clearly. It's that last aspect of versioning that I think was our big win with moving XDR into its own repo, and I expect it'll be similar here.
I'm happy to move it into a new repo now if folks think that's a good idea now, or we can wait a little while and do it down the track.
cc @graydon @sisuresh @jayz22 @soneso ?

I'm inclined to keep the file here in the short term

+1 on that, I would be inclined to move it away from env closer to the release, as the env interface should've stabilized enough at that point.


Update index.Rmd

fix: typo

Ah I see the index.md needs updating as well. @Fred-VLIZ can you make and commit the same change also in the index.md file on your fork of the repo and push the change?

@hansvancalster - done! :)

@Fred-VLIZ I think you still need to commit/Push? (I don't see a new commit in this PR)

Too fast again - I see it's done in PR #194. Thanks!


How to execute a wasm (rust) function with &str input and String output?

The rust signature for the function I want to call from C# using wasmtime.net
pub extern "C" fn makesha256(s: &str) -> String {
...
}

I use wasm-pack to compile and generate bootstrapping JS.
The function signature in wasm ends up being...
func (;27;) (type 4) (param i32 i32 i32)

The JS code generated by wasm-pack includes a few functions (and wrapping code) like these to facilitate simple calling by string, instead of pointers/etc. ...
function passStringToWasm0(arg, malloc, realloc) {}

function getStringFromWasm0(ptr, len) {}

What would be the equivalent for use in C#?
I tried to get a few ideas from the "Allocator" used here https://hacks.mozilla.org/2019/12/using-webassembly-from-dotnet-with-wasmtime/ .
But I couldn't make it match successfully the generated signatures (not sure if there are differences in types, or compiler, or simply versions over time that led to me having 3 arguments instead of 2).
By "successfully" I mean that I was able to call the function with what I thought would be the right locations and length, but after seemingly executing the function, I get null object returned.
I would appreciate any tips & tricks.
(I realize I did not supply huge amounts of detail - but these can, of course, be provided, if necessary)

Hi @aonnk.  Sorry for the delay in getting back to you.
The article you linked to (which is pretty out of date this point) was using cargo wasi build to create the .wasm file rather than wasm-pack.
With cargo wasi build, I get the following function type:
(func (param i32 i32) (result i32 i32))

Whereas with wasm-pack I get the same signature as you:
(func (param i32 i32 i32))

I suspect the difference is in support of the multi-value proposal.  As I've never really used wasm-pack, perhaps @alexcrichton might know how cargo wasi build gets multi-value enabled whereas the latest wasm-pack does not.
At any rate, if you look at the wrapping function in the glue code, you'll get some context on what the first parameter to the Wasm export is:
export function makesha256(s) {
    try {
        const retptr = wasm.__wbindgen_export_0.value - 16;
        wasm.__wbindgen_export_0.value = retptr;
        var ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
        var len0 = WASM_VECTOR_LEN;
        wasm.makesha256(retptr, ptr0, len0);
        var r0 = getInt32Memory0()[retptr / 4 + 0];
        var r1 = getInt32Memory0()[retptr / 4 + 1];
        return getStringFromWasm0(r0, r1);
    } finally {
        wasm.__wbindgen_export_0.value += 16;
        wasm.__wbindgen_free(r0, r1);
    }
}

The first parameter is actually the return value, which is expected to be a pointer to 8 bytes (4 bytes for the ptr and 4 bytes for the length).
Here the function is allocating 16 bytes of "stack" via __wbindgen_export_0 (I believe the wasm program is expecting a 16-byte alignment), passing in the stack address as the first argument, calling the function, reading the return string out of the memory, and then calling __wbindgen_free to free the returned string in the wasm program.
You should be able to replicate the same thing from C# using the exported stack pointer global __wbindgen_export_0.

Hi @aonnk.  Sorry for the delay in getting back to you.
The article you linked to (which is pretty out of date this point) was using cargo wasi build to create the .wasm file rather than wasm-pack.
With cargo wasi build, I get the following function type:
(func (param i32 i32) (result i32 i32))

Whereas with wasm-pack I get the same signature as you:
(func (param i32 i32 i32))

I suspect the difference is in support of the multi-value proposal.  As I've never really used wasm-pack, perhaps @alexcrichton might know how cargo wasi build gets multi-value enabled whereas the latest wasm-pack does not.
At any rate, if you look at the wrapping function in the glue code, you'll get some context on what the first parameter to the Wasm export is:
export function makesha256(s) {
    try {
        const retptr = wasm.__wbindgen_export_0.value - 16;
        wasm.__wbindgen_export_0.value = retptr;
        var ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
        var len0 = WASM_VECTOR_LEN;
        wasm.makesha256(retptr, ptr0, len0);
        var r0 = getInt32Memory0()[retptr / 4 + 0];
        var r1 = getInt32Memory0()[retptr / 4 + 1];
        return getStringFromWasm0(r0, r1);
    } finally {
        wasm.__wbindgen_export_0.value += 16;
        wasm.__wbindgen_free(r0, r1);
    }
}

The first parameter is actually the return value, which is expected to be a pointer to 8 bytes (4 bytes for the ptr and 4 bytes for the length).
Here the function is allocating 16 bytes of "stack" via __wbindgen_export_0 (I believe the wasm program is expecting a 16-byte alignment), passing in the stack address as the first argument, calling the function, reading the return string out of the memory, and then calling __wbindgen_free to free the returned string in the wasm program.
You should be able to replicate the same thing from C# using the exported stack pointer global __wbindgen_export_0.

Ah yeah this is where wasm-pack build differs in compilation settings than cargo wasi build, namely the latter is "use interface types if you can". The former (coming out of wasm-pack build) basically uses whatever ABI for the function that wasm-bindgen expects. The proc-macro and the JS glue are kept in sync internally to ensure this all works out.
If you're using a wasm-bindgen generated wasm module then if you're trying to match the ABI as @peterhuene says the JS glue can give you hints as to what's going on, but otherwise it's a pretty internal thing of wasm-bindgen and isn't guaranteed to be the same across versions.

Ah yeah this is where wasm-pack build differs in compilation settings than cargo wasi build, namely the latter is "use interface types if you can". The former (coming out of wasm-pack build) basically uses whatever ABI for the function that wasm-bindgen expects. The proc-macro and the JS glue are kept in sync internally to ensure this all works out.
If you're using a wasm-bindgen generated wasm module then if you're trying to match the ABI as @peterhuene says the JS glue can give you hints as to what's going on, but otherwise it's a pretty internal thing of wasm-bindgen and isn't guaranteed to be the same across versions.

Hi @aonnk:
Please let us know if the above information doesn't help you.
As this issue seems external to the .NET API, I'm going to close this issue for now.
Thanks!

Hi @aonnk:
Please let us know if the above information doesn't help you.
As this issue seems external to the .NET API, I'm going to close this issue for now.
Thanks!


There was an unhandled error

There was an unhandled error - sorry! Please create a ticket on github https://github.com/Stickymaddness/Procurement/issues. If the crash occured after Procurement was done downloading, zip and include your .tab files.
Im getting this error. How can i fix ?

Please include your debug log and your tab files.


add EXDEV_NOT_SUPPORTED

r? @gabriel Thanks!

The commits e4ad3ce0c31f...aff3c1986c43 introduce visual changes on linux. :mag_right: 7 removed, 11 changed

Changed: Folders_TLF-Normal_Public (before) (after)

Changed: Chat_Conversations_List-You_Rekey_Selected (before) (after)

Changed: Chat_Conversations_List-You_Rekey (before) (after)

Changed: Chat_Conversations_List-Selected_Normal (before) (after)

Changed: Chat_Conversations_List-Selected_Muted (before) (after)

Changed: Chat_Conversations_List-Part_Rekey_Selected (before) (after)

Changed: Chat_Conversations_List-Part_Rekey (before) (after)

Changed: Chat_Conversations_List-Normal (before) (after) (diff)
Changed: Chat_Conversations_List-Long_Top (before) (after) (diff)
Changed: Attachment_Message-Basic_Preview_Image_Downloading_Preview (before) (after) (diff)
Changed: Attachment_Message-Basic_Not_loaded (before) (after) (diff)
Removed: Text_Message-failure_reason (view original)
Removed: Error_View-User_Not_Found (view original)
Removed: Error_View-Key_Not_Found (view original)
Removed: Error_View-Key_No_Secret (view original)
Removed: Error_View-Key_No_Matching_GPG (view original)
Removed: Error_View-Device_No_Provision (view original)
Removed: Error_View-Bad_Login_Password (view original)


SHARK Installation

I encounter some issues when installing SHARK.
The following is my steps:
Install Python3.11:
apt update && apt install -y python3.11

# install pip for python3.11
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3.11 get-pip.py

Install SHARK
pip3.11 install nodai-shark -f https://nod-ai.github.io/SHARK/package-index/ -f https://llvm.github.io/torch-mlir/package-index/ -f  https://nod-ai.github.io/SRT/pip-release-links.html --extra-index-url https://download.pytorch.org/whl/nightly/cpu

Log:
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/nightly/cpu
Looking in links: https://nod-ai.github.io/SHARK/package-index/, https://llvm.github.io/torch-mlir/package-index/, https://nod-ai.github.io/SRT/pip-release-links.html
ERROR: Could not find a version that satisfies the requirement nodai-shark (from versions: none)
ERROR: No matching distribution found for nodai-shark

Any ideas?

nodai-shark does not exist as a python package (or in general), but as a standalone EXE. You can see what I mean by simply looking into the package index you attempt to pull from by running curl -G https://nod-ai.github.io/SHARK/package-index/. Unfortunately, these EXE files are not cross-platform and target Windows only (AFAIK). Maybe a Debian package for the CLI for Linux users is in order...
Until then, you can manually install SHARK with the following command set on Linux devices:
(This process assumes you have Python 3.11 and Git installed on your machine)
cd ~
git clone --single-branch --brancls h 20231009.984 https://github.com/nod-ai/SHARK.git shark
cd shark/
./setup_venv.sh
source shark.venv/bin/activate

Context:
You don't need to start in your home directory, but it's just an example.
20231009.984 is the latest stable tag for shark. If you don't care about stability, simply use https://github.com/nod-ai/SHARK.git instead.
The "shark" at the end of the git clone command specifies the new directory name to make within the parent directory. This can be omitted if you don't care about what the new directory is called.
Notes:
SHARK can run in a browser-style window when launched normally, or can be run through the command line exclusively. Please reference this part of the readme to get a rough idea of how to use the CLI. Running main.py with the --help flag will show all of the currently available CLI flags for generation.
SHARK's setup script checks for a $PYTHON variable which, if not set, defaults to the result of which python3. It looks like you're using PPA to install python, so I would recommend setting this variable with export PYTHON=python3.11. With PPA, you will also need to install python3.11-dev and python3.11-venv.
I am proficient, but not fluent, in issues regarding Linux devices but I can help as much as I can.


Add bounds/bbox to query

Hey.
Thank you for your contribution, but this repository is READ ONLY. You should close this PR and make a new one at http://github.com/geocoder-php/Geocoder.
Regards
The bot at SubtreeSplit.com

See https://github.com/geocoder-php/Geocoder/pull/1148


About the main file

Hi, I'm going to host this lib on cdnjs.
But I don't know which files should be added.
Could you explain to me?
Thanks!
https://github.com/cdnjs/cdnjs/issues/8508

You just need to build and include the built JS library. Probably best to include the minified and unminified library.

Clone the repo
Switch to stable branch
Run node build.js in the build folder. This will generate playcanvas-latest.js
Check the last commit of the form [RELEASE] vX.XXX.X. This is the build version.
Rebuild unminified: node build.js -l 0 -o playcanvas-X.XXX.X.js
Rebuild again minified: node build.js -l 1 -o playcanvas-X.XXX.X.min.js

It looks like cdnjs wants you to link to a "published" version. Which makes me think we should:

Hi @willeastcott, is it possible to release the official builds? It'll be a good "reference" since sometimes we can not so easily make sure if the built files been built 100% correctly, and for security reason, it'll be better to use a official build(if there is one), actually CDNJS started to support (subresource integrity) recently, this is also for security and integrity, we believe it'll be better to have the dist files from official, not us, what do you think? Thanks.

After this issue, I got thinking about this.
So first off, we do have official builds on code.playcanvas.com. All builds are there, including the most recent stable as playcanvas-stable.min.js and the latest master as playcanvas-latest.min.js. However, we don't list these anywhere.
There are a few options:

Create an index page for code.playcanvas.com that links to all the versions so people can find them.

Check builds into the main repo. I don't really like this as we create builds almost daily and it just feels like bloating the repo.

Check builds into another repo. e.g engine-builds

Publish builds to npm.

Several of the above.

Option 3 looks good, there are some libraries have this method for bower release, it'll be great!

There are engine builds available here: https://github.com/playcanvas/engine#how-to-build


Fix endsWith()

Current implementation of endsWith is wrong, since strstr finds the first match, not the last. To demonstrate:
endsWith("ba", "a"); // returns 1
endsWith("aa", "a"); // returns 0

This PR contains one possible fix, feel free to use something else.
Also, thanks for the awesome book!

@gcem Thank you for your contribution! 🙏


Set up websocket connection to player after joining a lobby

[x] refactor joining process (incl. add authentication process)
[x] establish websocket connection
[x] inform all players in the lobby about the players joining the game via websocket

60b284d7773563e69bb0d43c0cf6b0ff74d5bd5b
d33065947dd78ede35661c8a04ac6941f807041c


Nightly build against langchain4j main doesn't actually use the main branch

See https://github.com/quarkiverse/quarkus-langchain4j/blob/0.15.1/.github/workflows/build-against-langchain4j.yml#L45
We need to override the langchain4j.version property to the correct SNAPSHOT (and preferably also build the embeddings project and do the same with langchain4j-embeddings.version). Otherwise we're running against the version that we currently declare in the pom, which is not very useful to do nightly. The nightly job currently passes even though it should have started failing weeks ago due to https://github.com/langchain4j/langchain4j/pull/1226/
Or maybe it would be better to turn things around and introduce a CI build in langchain4j that runs the quarkus-langchain4j build for every PR in langchain4j? I briefly asked @langchain4j and he seems fine with it. WDYT @geoand? It would force langchain4j to be a bit more conservative, hopefully ;) (or at least let us know right away when something breaks)

It would force langchain4j to be a bit more conservative, hopefully

That is actually the exact opposite of what I want 😎.
I want upstream to do whatever is best for the project and the community and for us to adapt as necessary

I see :) ok then, in that case I guess I'll just try to fix the nightly job

🙏

It would force langchain4j to be a bit more conservative

It would not harm to at least be aware if I accidentally break anything

Sure yeah, that makes sense

I've submitted https://github.com/quarkiverse/quarkus-langchain4j/issues/701 to fix the nightly job on our side.
@langchain4j We can still have the tests in the langchain4j project too (but it may be too heavyweight), or maybe we could somehow make the nightly job send you notifications, or something?!

@jmartisk if notifications can be done, then it would probably be the easiest way?

Would this work? https://github.com/marketplace/actions/send-workflow-notifications

@jmartisk seems like yes, let's try it?


test.json file - INVALID

main.py cannot run without errors, check your test.json configuration file, the inputs and outputs are not correct

Obviously, this problem is independent of the platform. We tested it on both Windows and Linux.

Please retry
It was the wrong  test.json