interface serialization does not search inherited property

    public interface IHoge : IFuga
    {
        int hoge { get; }
    }

    public interface IFuga
    {
        int fuga { get; }
    }

var bin = JsonSerializer.Serialize<IHoge>(obj);

// expected:{"fuga":0, "hoge":0 }
// actual: {"hoge":0}
Console.WriteLine(Encoding.UTF8.GetString(bin));

On the commit a9b7dc7, ReflectionExtensions.cs, line 43 you're  checking for inherited members from BaseType, but not from interfaces.

Is there any update on this?. Serialization still only serialize the properties from the base type.

Any update on the progression with this issue? I'm currently using 1.3.7 and inherited classes and interfaces are not working for me.


Why cursor is not an EventEmitter?

I think it may be useful, especially with live queries. For now, update of one live query invokes handlers of the same collection for other live queries. It's not good, because any handler can emit a re-render of different parts of the screen or make some hard computations.
P.S. In my project, I've extended Cursor specially for live queries, added some useful features (like optional binding for angular scope for cleanup and digest) and made it EventEmitter for emitting result event. It works great.

Probably good point. You can PR it. I think if you replace the constructor initialization with an EventEmitter (or extend object with event emitter on init) it would not break anything.
BTW, you should keep in mind linvodb emits events for live queries itself, and I've implemented angular binding like this:
LinvoDB.createService = function(module, model, disableScope)
{
    module.factory(model.modelName, ["$rootScope", function($rootScope)
    {
        if (! refreshScope) refreshScope = _.debounce(function() { if (!$rootScope.playerVisible) $rootScope.$apply() }, 250);
        model.on("liveQueryUpdate", function() { if (!disableScope) refreshScope() });
        return model;
    }]);

};


Is it intentional that maxAge is flagged as deprecated in @types/jsonwebtoken

Description
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/73b90cedc748d3da3cb203d7dd6e7a6f806fdc17/types/jsonwebtoken/index.d.ts#L86-L90
I don't see any deprecation warning in code or readme in this repo, is it intentional? From git blame, it seems it was added by @samuelhorwitz 5 years ago.
Should I send a PR to DefinitelyTyped to remove it and change the type to number | string?
Reproduction
Environment

I added this in https://github.com/DefinitelyTyped/DefinitelyTyped/pull/8296 and haven’t thought about it in a long time, but I remember dealing with a lot of missing types regarding web crypto at the time and just getting things working locally and then committing upstream. Which is to say I haven’t kept any of these things up to date since and I’m sure if the blame is tracing back to my work 5 years ago that it’s very likely out of date in some way.

maxAge is still marked as deprecated in v8.5.1 and is still missing number in declared type alternatives. The @deprecated attribute was added v5.7.0 and is still here. Is there a plan to drop it or replace with something else or declaring it deprecated is just a bug? Thanks.


MAINT: backports / preparation for SciPy 1.3.1

Update release notes / version numbers & include backport PRs below. Please do check this over.
Backports:
https://github.com/scipy/scipy/pull/10431
https://github.com/scipy/scipy/pull/10379
https://github.com/scipy/scipy/pull/10309 (5 commits cherry-picked, unfortunately)
https://github.com/scipy/scipy/pull/10207
https://github.com/scipy/scipy/pull/10196
https://github.com/scipy/scipy/pull/10233 (this was directly merged to maintenance branch before the bump to "1.3.1 unreleased", unfortunately)
Could maybe add a short sentence summarizing the key bugfixes.

I think I've identified the correct backport PR for the Travis issue, but the doc build issue is a little less clear. @mdhaber describes this in a comment here: https://github.com/scipy/scipy/pull/10286#issuecomment-502396266 Not sure if there's a single commit responsible for the eventual fix for that?

Also #10503 would be nice.

I've updated this backport PR substantially based on recent fixes / backport-tagged PRs that have been merged.
In addition to the doc building fix I backported, I may also now need to grab another unrelated doc building fix from #10540, but I'll wait to confirm that this issue shows up here as well first.
There's an umerged PR with a backport label here: #10498
Details / new authors should be in the updated 1.3.1 release notes here.

Yeah, still a mess--I'll need more backports still. Some of the errors I do recognize from recent things at least, and perhaps the ones I don't are indirect failures from those..

The qhull test fails since the old Qhull gives facets in different order.
I pushed a commit changing the test case to match the Qhull version in 1.3.0.

I've added several more backports, some of them from dissection of git history near points of failure in the source code with newer NumPy.
I'm hoping CI will be close to passing now. I still need to update the release notes with this latest batch of backports--I've kept some notes on what I've backported this evening so I can follow up with the release note changes a bit later.

ping @rainwoodman or @sturlamolden on the cdktree test failures in this branch

It looks like you got a test from #10457 (test_cdktree_empty_input) but not the rest of the commit. Either backport all of #10457 (it is just a few lines) or remove the test.

CI is finally passing -- I still need to update the release notes for the recent backport additions -- I'll likely do that this evening

That is great :)

Pulled in another backport and updated the release notes for the batch of backports over last few days.
Let me know if any entries are missing / wrong -- I think I got them all.

Let me know if any entries are missing / wrong -- I think I got them all.

Indeed, didn't see any missing ones.
Merged, thanks @tylerjereddy

Ok, I've created the source archives using cython 0.29.13 & wheels will build overnight--fingers crossed.


[founderyvtt] New chart request

requesting chart for FounderyVtt https://github.com/mbround18/foundryvtt-docker
Mainly a To do for myself, will start working on this within this week

Added, danke!


Change login/sign up pages to use global tailwind styles

Change the tailwind css used in the login and sign up pages so that ituses the styles created in #63

@Taks07 was this resolved by #76 ?

Yes, looks like i linked the wrong issue :(


Login process for existing organizations

add all participant organizations to the dropdown list
add password field for selected organization (e.g. MD5 hash)
provide login process with stored password
provide guest login without password

Currently list of orgs are hardcoded in project file: https://github.com/zskarte/zskarte/blob/master/zskarte2/src/app/entity/zso.ts

If no password is provided or guest organisation is selected, switch to demo mode (reset every hour)

Dependent on #20


Get Nodes and Connected Nodes Used for Response Generation

I need functionality to retrieve the nodes that were utilized in generating a response, along with the next connected nodes for each of those nodes.
Specifically:

Identify all the nodes actively contributing to the response generation.
For each identified node, fetch the details of its directly connected successor nodes.

This feature would significantly enhance the search capability and exploration of the knowledge graph, allowing for deeper insights into how responses are constructed and improving traceability.

We currently support returning the retrieved content using the only_need_context parameter. However, further modifications may be needed to meet specific requirements.


KerasPolicy is not predicting utters as expected

We are currently working on a pipeline composed of NLU tensorflow_embedding, and Memoization + KerasPolicy + fallback policy. We are using the default pipeline configuration. We have a set of 30 intents/utters and several stories.  The problem faced is that, even when intents are extracted, when it enters to KerasPolicy, the output utter (with over 90% confidence) is never related to the intent and it is always the wrong expected utter. We have:

[ ] NLU is working excellent - feature extraction is very accurate (for correct intents, confidence >90%)

[ ] MemoizationPolicy is working fine, when users fall into default stories

[ ] Fallback policy seems to be well calibrated.

[ ] KerasPolicy() is not working at all, even when: (a) is inserted out_of_scope intents over some stories, or (b) increased the number of stories, or   (c) increased the size of stories, (d) calibrated TRAINING_EPOCHS.

The complete project can be seen in https://github.com/lappis-unb/rouana (branch v2.1.0).
Rasa Core version:
rasa-core==0.10.3
Python version:
python3.6
Operating system (windows, osx, ...):
ubuntu/osx

when you say increased the number of stories, by how many do you mean? Keras does learn to generalise for some paths, but it's not guaranteed that it will always predict the right action. You can also try out the EmbeddingPolicy, to see if that works better

I've tested Keras for small stories (around 4-5 intents+utters), around 10 intents, and 15-20 stories examples (used smaller batch_size in Keras)

yeah you probably need a lot more than 15-20 stories for it to generalise properly. You can take a look at our demo bot, the policy jumps in there a lot and does give accurate predictions (of course not 100% of the time).
I'm gonna close this issue now, since it's more of a discussion, if you'd like to discuss it further, please create a post on our forum


Feat:  Admin UI products page

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 40.634%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
5987

Relevant Lines:
14734

💛  - Coveralls


use prepared statements for better performance?

https://www.postgresql.org/docs/current/sql-prepare.html

With the pg npm package, this can be done by passing a name field to client.query().


Fix a race in ThreadUnpark

If park and notify are called concurrently, this is possible:
thread A: call park
thread B: call notify
thread A: if !self.ready.swap(false, Ordering::SeqCst) // if !false // if true
thread B: ready = true
thread B: self.thread.unpark()
thread A: Thread::park

So, thread A is parked, however notify is called.
I did not reproduce a problem however.
Fixes #500

Ah this isn't actually a race today (explained here), and this PR would actually introduce such a race, so I'm going to close.


catodon - specifying spanish post shows up in mastodon as unknown

post language doesn't seem to be supported

removed language menu


unbound: 1.5.9 -> 1.5.10

Fixes a fair number of bugs, see https://www.unbound.net/download.html.
Looks good to backport to 16.09

cc @fpletz

@joachifm any reason not to merge?

@lethalman not that I know of :)


Cropped image dimensions by 30% is like 5% less size on memory

note: I know the main purpose of this, is to smart crop, and this is already great.  Still I have another problem
Context
I want to use this amazing library for uploads in browser. I tried to grab code from testsuite and it works fine.
Unfortunately I find in most cases:
Problem
cropped size in px / original size in px
is always way less than
cropped size in mb / original size in mb
I wished smartcrop.js would let the image quality as is, in this case I think size on memory would drop relatively to the cropped size ( logically as images are raw data? ).
Thanks a lot !!

I wished size would drop relatively as smartcrop is intended also for optimizing size. that would be great !

Hi @bacloud14,
I'm not sure what you mean. smartcrop.js does not do anything to image quality nor does it do image compression - or anything else - to the image. It just gives you candidate crops. The test suite just draws on . It doesn't do image compression either.
Could you provide a bit more background on what you mean?

ok, I tried that "guitarist.jpg" file, cropped with var options = { debug: false, width: 250, height: 250 };
The result image of type 'png' with these observations:
guitarist.jpg is 427 * 640 px
canvas.png is 250 * 250 px
while
guitarist.jpg is 170KB
canvas.png is 146KB
I thought canvas.png would much less in file size.
Something near : ((250 * 250) / (427 * 640)) * 170 = 38.87 KB

Like when you take a paper, crop it with scissors, the amount of paper is always the same relatively to size.

You are really comparing apples and oranges here. PNG and JPEG compress data differently. PNG is generally a quite bad choice to compress photographs. Maybe https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types#choosing_an_image_format or https://www.freecodecamp.org/news/best-image-format-for-web-in-2019-jpeg-webp-heic-avif-41ba0c1b2789/ help you understand that a bit better.
But that really doesn't have anything to do with smartcrop. Smartcrop doesn't produce jpegs or pngs - it just gives you crops.

Probably I mistakenly change the name of the output file to PNG.
So I assume crop doesn't change extension I mean I'm sure now.
Anyway, my question was clear on why the crop size is not relative to the new size.
Anyway closing this as I seem not to be presenting the idea well. Thanks.


Link: fix icon slot place incorrect

Please make sure these boxes are checked before submitting your PR, thank you!

[x] Make sure you follow Element's contributing guide (中文 | English | Español | Français).
[x] Make sure you are merging your commits to dev branch.
[x] Add some descriptions and refer relative issues for you PR.

please resolve conflicts, e.g. rebase dev

Issues without a valid reproduction link will be closed directly.


Infinite Loop with Auth

Bug report
Honestly I'm not sure if this is an actual bug or a flaw or if I'm missing a point but I'll give you the detailed description to understand. Also I'm not specifically sure if we should name this a supabase or an auth-helper problem.
The Problem
I'm using the most recent nextjs auth helpers
 "@supabase/auth-helpers-nextjs": "^0.2.9",
  "@supabase/auth-helpers-react": "^0.2.4",

Now I'm also using getUser on the server (with the [...auth].js file etc as described in the documentation).
On the client-side I use the respective useUser() hook.
Client-side, simplified, looks like this:
export Client() {
  const user = useUser();

  useEffect(() => {
     if (user) routeTo('/dashboard');
   }, [user])
}

Server basically just uses getUser(ctx) to see if someone is logged in and if no will redirect to the login page. And here comes the big problem:
export const getServerSidePropsAuth: GetServerSideProps<{
  user?: User;
}> = async (ctx) => {
  try {
    const { user, error } = await getUser(ctx);

    if (user && !error) {
      return {
        props: { user },
      };
    }

    if (error) {
      throw error;
    }
  } catch (e) {
    console.error(e);
    process.exit(1);
  }

  return {
    props: {},
    redirect: { destination: LOGIN_PATH, permanent: false },
  };
};

What happens now is: You might have a stale JWT in your client (which I just experienced) but the server - for whatever reason (e.g. user deleted? e.g. database not reachable, e.g. project paused) cannot confirm the user. More specifically in the console of the server it says Getting the user object from the database... Request Failed.
Now you are in an infinite loop. useUser tells you there is a user so you direct to /dashboard but authentication on the server says there is no user and redirects you to /login which will redirect you to /dashboard again.
As per Architectural Principle "Design for Failure" we are designing a world full of problems and edge-cases and we have to cover them and I think this behaviour is flawed.
Expected behaviour
useUser() and getUser() should try to be pure/isomorphic in their behaviour in the sense of delivering the same result or at least synchronizing it.

+1 Having this issue too

No longer relevant as some of these methods has been deprecated and the latest auth-helpers fix many bugs.

Doesn't sound very convincing. Can you pinpoint to the source that would fix this?

No longer relevant as some of these methods has been deprecated and the latest auth-helpers fixed many bugs.

@silentworks Is useUser deprecated? And if so, what are the new auth-helpers?

[...auth].js is no longer recommended in our docs. The useUser is still available but this alone cannot lead to infinte loop, the infinite loop here is in the application design rather than the library from the looks of it. You can take a look at these examples https://github.com/supabase-community/supabase-by-example which handles all that you've mentioned here without any infinite loops. Also note you made mention of withPageAuth which is deprecated and has been removed from the library too.


Stuck at INITIAL in second half

I think this broke in: d0f94eb383a61c4537cd8e700bc50441160eff70
The most likely is that depending on frequency of the updates, the autoref still sends a finish message, but if it does not, the condition to initiate the game.ready_real_time never gets true in:
            elif not game.state.first_half and game.sent_finish:
                game.sent_finish = False
                game_type = ''
                if game.overtime:
                    game_type = 'overtime '
                info(f'Beginning of {game_type}second half.')
                kickoff()
                game.ready_real_time = time.time() + HALF_TIME_BREAK_REAL_TIME_DURATION

Note that in the game where this was spotted, the signal game.sent_finish was set to True because the log contains:
[5153.612|0357.960] Info: Sending FINISH because seconds remaining = 0
[5153.612|0357.960] Info: Sending 44826:STATE:FINISH to GameController.
[5153.612|0357.960] Info: Waiting for GameController to answer to 44826:STATE:FINISH.
[5153.812|0357.960] Info: Waiting for GameController to answer to 44826:STATE:FINISH.
[5154.013|0357.960] Info: End of  first half.
[5154.488|0357.968] Info: New state received from GameController: STATE_FINISHED.
[5154.673|0357.984] Info: New state received from GameController: STATE_INITIAL.
[5163.082|0359.024] Info: STATUS: Avg speed factor: 0.093 (over last 20.04 seconds)
[5163.082|0359.024] Info: STATUS: state: STATE_INITIAL, remaining time: 180
[6907.456|0494.472] Info: STATUS: Avg speed factor: 0.079 (over last 20.06 seconds)
[6907.456|0494.472] Info: STATUS: state: STATE_INITIAL, remaining time: 180

So it's definitely weird that the transition to state READY is not triggered.

From trying to get more detailed logs, #236 fixed it. Probably through 51de238009fd0a2691689dfb4dcdbc54d028e3c6


External BOSH Director config is ignored when creating UAA clients

The code at https://github.com/pivotal-cf/pcf-prometheus-pipeline/blob/b390ca00065bda363e48f64e5f9524dcf6cfc815/pipeline/tasks/common.sh#L39-L41 always gets the director IP and creds from OpsMan, even if an external director has been specified.
We ran into this when we tried attaching a public-facing IP address to our OpsMan director in an attempt to reach it from our Concourse instance (which is outside the OpsMan private network).
The failure we see in create-uaa-clients is:

Logging into BOSH UAA...
failed to access https://<IP_ADDRESS>:8443: execution expired

Thanks!
Henry && @jamesjoshuahill

This is the expected (and I believe correct) behaviour. The goal of this task is to create UAA clients for Prometheus exporters. Even if you are deploying Prometheus to an external BOSH director, you want your bosh_exporter to monitor the PCF BOSH Director (OpsMan Director). Unless you disagree I'll close this issue in favour of https://github.com/pivotal-cf/pcf-prometheus-pipeline/issues/14.

Yep, that makes sense.


Undocumented change of behaviour in Unified Interface

Using this method in the classic "Web Client" opens a new window that contains (just) the specified web resource.
Using this method in Unified Interface opens a new window that contains the specified web resource embedded in a page with navigation components such as sitemap.
This change is not acknowledged in the documentation (but hopefully because it's a bug - ticket raised).

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

ID: 75ccf05e-86b9-3638-ccd6-e18849c82eb2
Version Independent ID: d550c9e5-4fc4-6ed7-e50c-93584ee7b7ca
Content: openWebResource (Client API reference) in Dynamics 365 for Customer Engagement
Content Source: ce/developer/clientapi/reference/Xrm-Navigation/openWebResource.md
Service: crm-online
GitHub Login: @KumarVivek
Microsoft Alias: kvivek

Any update on this issue? Can we hide the sitemap from webresource or a workaround to show webresource as popup?


fix(AppHeader): clean up search bar from experiment

Overview

We ran an experiment to default the search bar to open on the catalog page after new users went through onboarding flow. We decided to go with the variant where the search bar is not defaulted to open so we can clean up this logic in the header.

PR Checklist

[ ] Related to designs:
[x] Related to JIRA ticket: DISC-425
[ ] I have run this code to verify it works
[ ] This PR includes unit tests for the code change

📬Published Alpha Packages:@codecademy/gamut-kit@0.6.88-alpha.db87bb.0@codecademy/gamut-labs@30.6.2-alpha.db87bb.0<EMAIL_ADDRESS>
🚀 Styleguide deploy preview ready!https://623dd280f629a1068f1deef8--gamut-preview.netlify.appDeploy Logs

🚀 Styleguide deploy preview ready!https://6241bb96e214c11d2f6f936e--gamut-preview.netlify.appDeploy Logs


Update my originally added Github Profile

Hi @sanjay-kv as you are the main contributor and maintainer I was hoping you could answer my query.
I wish to update my Github profile, so first I decided to raise this blank issue so not to disrupt the automatic workflow of the repo.
Should I create a new issue from the Add your Profile template. or just go to the screenshots area in my forked copy and change the screenshot to update the profile.
Kindly spare some time for this query.
Regards,
@yashksaini-coder

I dont think updation is possible atm. there is some bugs which prevents from updating. i will fix and let you know soon

Okh understood @sanjay-kv Thx for replying.


How to make complex gradient on Navbar?

#

check this link: https://github.com/react-native-community/react-native-linear-gradient#locations

IMO, creating that with this library would be extremely difficult.
It looks actually more like a an image blur than a gradient.
Maybe something like this could help:
https://github.com/react-native-community/react-native-blur

Hey! I'm closing this since this is a stale issue. If you believe it's still relevant to fix, post a comment and I'll reopen.


feat(addon-components): add ValaxyThemesResolver

This PR introduces a new ValaxyThemesResolver, enabling seamless integration of third-party theme components. And updated the valaxy-addon-components documentation

So cool. Is it possible for us to add an e2e test?

The fact that this is an extension means conducting e2e tests for it within Valaxy would increase the coupling between Valaxy and valaxy-addon-components. We can accept third-party resolvers defined by other developers, similar to unplugin-vue-components#importing-from-ui-libraries.


Add fuzzing test for JSON reader

This is just an experimental PR to add fuzzing test in IT. It will not break the CI because the fuzzing test is marked as XFail
This PR contains 3 parts:

Schema generator: randomly generate a JSON schema described in PySpark's DataType
JSON generator: randomly generator a JSON string based on the given schema
test_json_read_fuzz: test the behavior of CPU and GPU on reading a random json file (marked Xfail, so it will not impact the CI job)

Data Type supported so far:

primitive types: int, long, float, double, string
nested types: struct and array

Plan to support in the future:

primitive types: date, timestamp
nested types: map

build

build

build

build

build

build

please check the failed log before re-trigger,
Error: 3-25T06:40:13.649Z] [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.13:check (default) on project rapids-4-spark-parent: Too many files with unapproved license: 1 See RAT report in: /home/jenkins/agent/workspace/jenkins-rapids_premerge-github-4260/target/spark24X/rat.txt -> [Help 1]

exclude related json filed at https://github.com/NVIDIA/spark-rapids/blob/branch-22.04/pom.xml#L1154-L1178 to pass the license test

build

build

build

build

Does this close issue https://github.com/NVIDIA/spark-rapids/issues/4138 ?

Does this close issue #4138 ?

Yes. Have updated.

Hi @revans2. Do you think we could merge this PR or not?

@HaoYang670 I am very busy with other things. Please don't let me block this from going in. If others have approved it then we can merge it in and if there are issues we can iterate on them as we find them.


RN 0.68 - Android 12  (API 31) -  RNN 4.2.4 - Issues

Bug summary
After upgrading to 0.68.0 and targetSdkVersion 31 (Android 12)
It always restarts or opens a new activity. Different behavior of RN 0.67 and targetSdkVersion 30
Case 1
Dead state (100% dead) or Fake dead state (if I close the app with the android back button)
Send 2 notifications
Click on one notification message
The app opens ok
Notifications.getInitialNotification() returns data
While the app is open click on the second notification message
App will open again (restarting the main activity).
Notifications.getInitialNotification() returns  no data
Notifications.events().registerNotificationOpened() returns data
Case 2
Background state
Send 2 notifications
Click on one notification message
App will open again (restarting the main activity).
Notifications.getInitialNotification() returns data
While the app is open click on the second notification message
Notifications.getInitialNotification() returns  no data
Notifications.events().registerNotificationOpened returns data
Library version
4.2.4
Environment info
System:
OS: macOS 12.3
CPU: (4) x64 Intel(R) Core(TM) i5-6360U CPU @ 2.00GHz
Memory: 191.68 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 17.7.2
Yarn: 1.22.18
npm: 8.5.2
Managers:
CocoaPods: 1.11.2
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8193401
Xcode: 13.3/13E113 - /usr/bin/xcodebuild
Languages:
Java: <IP_ADDRESS> - /usr/bin/javac
npmPackages:
react: 17.0.2 => 17.0.2
react-native: 0.68.0 => 0.68.0
Steps to reproduce
Upgrade to 0.68 using react-native-upgrade-helper
https://react-native-community.github.io/upgrade-helper/
RN new architecture opt-in: disabled.
Tested on a real device (Samsung S10 - Android 12)
Thanks

same issue, seems to be related to TaskStackBuilder but I really know nothing about how it works


2024-12-06_01-36-32_master-next_python3-boto3

Automatically created.

Backport failed for kirkstone-next, because it was unable to cherry-pick the commit(s).
Please cherry-pick the changes locally and resolve any conflicts.
git fetch origin kirkstone-next
git worktree add -d .worktree/backport-10652-to-kirkstone-next origin/kirkstone-next
cd .worktree/backport-10652-to-kirkstone-next
git switch --create backport-10652-to-kirkstone-next
git cherry-pick -x dd429b02056eb9d75b487a0a86622947663eaa00

Successfully created backport PR for scarthgap-next:

#10656

Successfully created backport PR for styhead-next:

#10657


Linux support

Resolves #6.

PR status
Literally all tasks are done!

[x] implement basic ALSA audio context
[x] implement WAV file reader and writer
[x] revive WAV export
[x] replace WinForms with NativeFileDialogs.NET
[x] configure sample rate
[x] make sample browser functional again
[x] enumerate and configure audio output devices
[x] read MP3 and FLAC
[x] implement MIDI input
[x] add "save changes" dialog back (probably as a WaveTracker custom dialog window)
implement slightly more advanced text input (has been implemented already!)
[x] revive StereoBiQuadFilter
[x] maximize window on startup
[x] make sure the Windows build isn't broken

[x] implement mmsystem audio backend
[x] MIDI input again?
[x] keep system sounds playing on custom message dialogs
[x] make sure embedded FFmpeg libraries are being found

make input fields actual input fields instead of spawning a dialogue? (has been implemented already!)

Considerations
In https://github.com/squiggythings/WaveTracker/issues/6#issuecomment-2325044977, @tgpholly said that it would be more worthwhile contributing upstream to get better Linux support into NAudio. But I feel like instead it would be harder and take a longer time to implement, given how simple the audio interface can be for WaveTracker as far as I understand.
Explanations
For the implementation of the ALSA audio context, I'd like to mention this handy article on Minimal cross-platform graphics. I'd probably refer to it again for the Windows backend reimplementation, and it'll serve the same purpose eventually for MacOS.
The audio thread is incredibly simple, it just reads from the audio provider and writes to ALSA in a loop. Though I had to tweak the latency and sample buffer size to get results that sounded ok on my machine and didn't underrun too much, so I'm not sure about that. I think that'll probably become a setting.
As a full disclosure, I maintain NativeFileDialogs.NET and it binds to a C library (which isn't mine).
Edit: since then, the decision to use FFmpeg for audio file reading has been accepted. I decided to use FFmpeg 4.4. It's quite old, but the main benefit is that there is already an existing Nuget package - FFmpeg.Native - which automatically imports the libraries needed with the correct version. That way it's guaranteed that WaveTracker won't have any issue with loading them.
Here's a demo of sound, dialogs and WAV export working :D
https://github.com/user-attachments/assets/82da0919-6c0a-4e6a-8baf-5b9b68df5711

Thank you so much for your contributions. I hope my existing code isn't too messy or causing many problems!
If we could get cross platform audio output working without any of the windows-dependent NAudio libraries that would be a huge step forward. I think I might even separate out the logic that gathers and processes signals from all the channels in the AudioProvider.Read() loop into a function that just processes one sample's worth of audio and returns the resulting left and right values. Then that could just be linked into whatever code is feeding samples into the platform's audio buffer. I think that would be cleaner to separate the WaveTracker specific logic from the platform's audio API.
Right now I'm looking into modifying the custom input fields to accept text input, highlighting, arrow key cursor navigation, all the things you'd expect an input field to have; which, granted, is quite a lot. I think this will be the biggest roadblock towards getting the app to be cross platform, so I'd like to start chipping away at it now. Of course there are cross platform alternatives to winforms that could replace the pop-up dialog in an emergency, but I'd really really really like to have seamless field editing without opening up an ugly pop up. (It would also allow for searching in the sample browser!)

Thank you so much for your contributions. I hope my existing code isn't too messy

So far I honestly expected all of this to be much harder than it actually was. To the contrary I find your code pretty readable and well-organized xd

:eyes:

Audio devices! (ALSA description names are quite verbose...)

You could also just filter out actual duplicates (check if the name is the same as existing device on the list, if so skip adding it to the list). I think LMMS (open source FL Studio clone) does it that way.

I'm just not exactly sure how to know it's a duplicate, because both the full description and name are always different from each other. The output-only stuff is just a pattern I noticed...

Full print of my PCM devices
The format goes:
[I/O] name
  description

The description can span several lines, and I and O are absent if the device doesn't do input/output respectively.
[I/O] null
  Discard all samples (playback) or generate zero samples (capture)

[I/O] lavrate
  Rate Converter Plugin Using Libav/FFmpeg Library

[I/O] samplerate
  Rate Converter Plugin Using Samplerate Library

[I/O] speexrate
  Rate Converter Plugin Using Speex Resampler

[I/O] jack
  JACK Audio Connection Kit

[I/O] oss
  Open Sound System

[I/O] pipewire
  PipeWire Sound Server

[I/O] pulse
  PulseAudio Sound Server

[I/O] speex
  Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)

[I/O] upmix
  Plugin for channel upmix (4,6,8)

[I/O] vdownmix
  Plugin for channel downmix (stereo) with a simple spacialization

[I/O] default
  Default ALSA Output (currently PipeWire Media Server)

[ /O] hdmi:CARD=HDMI,DEV=0
  HDA ATI HDMI, HDMI 0
  HDMI Audio Output

[I/O] usbstream:CARD=HDMI
  HDA ATI HDMI
  USB Stream Output

[ /O] hdmi:CARD=Generic,DEV=0
  HD-Audio Generic, HDMI 0
  HDMI Audio Output

[I/O] usbstream:CARD=Generic
  HD-Audio Generic
  USB Stream Output

[I/O] sysdefault:CARD=Generic_1
  HD-Audio Generic, ALC294 Analog
  Default Audio Device

[I/O] front:CARD=Generic_1,DEV=0
  HD-Audio Generic, ALC294 Analog
  Front output / input

[ /O] surround21:CARD=Generic_1,DEV=0
  HD-Audio Generic, ALC294 Analog
  2.1 Surround output to Front and Subwoofer speakers

[ /O] surround40:CARD=Generic_1,DEV=0
  HD-Audio Generic, ALC294 Analog
  4.0 Surround output to Front and Rear speakers

[ /O] surround41:CARD=Generic_1,DEV=0
  HD-Audio Generic, ALC294 Analog
  4.1 Surround output to Front, Rear and Subwoofer speakers

[ /O] surround50:CARD=Generic_1,DEV=0
  HD-Audio Generic, ALC294 Analog
  5.0 Surround output to Front, Center and Rear speakers

[ /O] surround51:CARD=Generic_1,DEV=0
  HD-Audio Generic, ALC294 Analog
  5.1 Surround output to Front, Center, Rear and Subwoofer speakers

[ /O] surround71:CARD=Generic_1,DEV=0
  HD-Audio Generic, ALC294 Analog
  7.1 Surround output to Front, Center, Side, Rear and Woofer speakers

[I/O] usbstream:CARD=Generic_1
  HD-Audio Generic
  USB Stream Output

[I/O] sysdefault:CARD=Microphones
  Blue Microphones, USB Audio
  Default Audio Device

[I/O] front:CARD=Microphones,DEV=0
  Blue Microphones, USB Audio
  Front output / input

[ /O] surround21:CARD=Microphones,DEV=0
  Blue Microphones, USB Audio
  2.1 Surround output to Front and Subwoofer speakers

[ /O] surround40:CARD=Microphones,DEV=0
  Blue Microphones, USB Audio
  4.0 Surround output to Front and Rear speakers

[ /O] surround41:CARD=Microphones,DEV=0
  Blue Microphones, USB Audio
  4.1 Surround output to Front, Rear and Subwoofer speakers

[ /O] surround50:CARD=Microphones,DEV=0
  Blue Microphones, USB Audio
  5.0 Surround output to Front, Center and Rear speakers

[ /O] surround51:CARD=Microphones,DEV=0
  Blue Microphones, USB Audio
  5.1 Surround output to Front, Center, Rear and Subwoofer speakers

[ /O] surround71:CARD=Microphones,DEV=0
  Blue Microphones, USB Audio
  7.1 Surround output to Front, Center, Side, Rear and Woofer speakers

[ /O] iec958:CARD=Microphones,DEV=0
  Blue Microphones, USB Audio
  IEC958 (S/PDIF) Digital Audio Output

[I/O] usbstream:CARD=Microphones
  Blue Microphones
  USB Stream Output

So... I realized that NAudio.Core actually contains the DirectSound output implementations that link to Windows libs. In the future I might contribute to NAudio to at least make sure the Windows-specific classes get a [SupportedOSPlatform("Windows")], but I'm not really confident in importing NAudio as sit stands so for now I'm copying classes over when I can. I don't think WaveTracker uses many features of NAudio anyway so it shouldn't end up being too many classes.

The sample browser is now functional again but I really don't like the code I've written for that to happen... I'll see if it's still bearable when I add MP3 and FLAC parsing somehow, but even then I'd love feedback and ideas on that when I'm done.

Is there a build available yet for the linux version?

You can checkout my branch and run it with dotnet run, but as you can see it's not complete. The tasks that are left to be done are laid out in the description of this PR.

Progress is being made on custom text boxes. still pretty barebones and missing a lot but it's a start!

Progress is being made on custom text boxes. still pretty barebones and missing a lot but it's a start!

Looks cool, maybe there should be an option to choose native dialogs and custom dialogs

I agree that the inputs and dialogs should be native--they bring input method and internationalization support for free, which custom ones will take forever to do well...

Monogame already supports IME inputs. I tested that with my Japanese IME and it already gets the characters correctly. It's just that the font used doesn't support displaying them. So I think it's just a font problem.

Update: I figured out how to get midi input on Linux and how to test it!

I copied NAudio.Midi into a separate WaveTracker.Midi csproj. What I'll do is implement MidiIn for Linux in there and let WaveTracker depend on that.
The ideal scenario is NAudio just supporting Linux out of the box, but as I said adding Linux support to NAudio is gonna take more time than doing this. I should probably keep in mind to make a PR to NAudio after all of this, at least for the MIDI part

Midi input implemented! Windows should still work but I didn't test that. I'll need to revive the Windows audio backend before I do that anyway.
https://github.com/user-attachments/assets/c3479b62-5f5b-4cf3-91e9-14eefe3489b8

There's bugs where the note stays on, but I have no clue if it's a WaveTracker issue or an issue with how I send note events from Alsa...

First, I can't thank you enough for your contributions. This is my first time ever making any kind of desktop application like this so contributions towards other platforms is greatly appreciated especially since I have even less experience with Linux and Mac development, and would take much much longer if I were doing it myself.
It sounds to me like the note off is only sounding when the note that was released is the same that started? i.e. Holding down C, then D, then releasing C, then releasing D would keep C playing? It could be a wavetracker issue, but it wouldn't be my first guess since the PianoInput ReceiveMidiNoteOn and ReceiveMidiNoteOff should handle this (assuming the proper midi note off events are actually being received)
It might be worth mentioning I ran into a similar issue with the original MIDI input that some MIDI controllers send note offs by sending a Note-On-but-with-velocity-0, while others actually sent a dedicated note off event followed by a separate CC value for release velocity, so I had to account for both situations. Maybe this is related? I don't know.
In other news, built-in field entry for numberboxes and textboxes is pretty much complete. Very close to being able to say goodbye to Windows Forms! You can select, copy and paste, rendering also culls if the typed text goes beyond the bounds of the box etc... It uses Monogame's built-in text input which takes IME input and all that. Although yes, the default font doesn't support every character right now, (though I expanded it a little bit to include cyrillic characters and more accented latin characters)
Just today I made the inputfields compatible with the high resolution font mode as well, which does include most characters.

I believe this means the only remaining windows forms dependency is the one needed to maximize the window on startup, and the one to catch the app closing event to issue an unsaved changes warning.

this could be potentially awesome I'm looking for a new tracker to use since most of the options on Linux are rather unappealing and Renoise obviously isn't FOSS if I can potentially help with this at all I would love to

also i don't know if this is something your planning to do but utilizing Pipewire and or JACK for the audio and midi back-end could be very powerful for routing between  applications and further supporting various modular workflows

also i don't know if this is something your planning to do but utilizing Pipewire and or JACK for the audio and midi back-end could be very powerful for routing between  applications and further supporting various modular workflows

I'm using ALSA to have audio output on Linux (and also for MIDI input). I must admit it's my first time dealing with audio in such a manner so I haven't tried using Pipewire or JACK directly, but both of these APIs seem to be listed as audio output devices in ALSA anyway, so I think you won't have any trouble in that regard.

I believe this means the only remaining windows forms dependency is the one needed to maximize the window on startup, and the one to catch the app closing event to issue an unsaved changes warning.

Ah, I didn't catch that, added it to the checklist, thanks.
It kinda baffles me, Monogame doesn't seem to provide anything to do this from within the game... So far the only thing I could find was this forum question which solves it by manually binding to the relevant SDL function. Now that I look at the GitHub issues, same thing but for them it doesn't work...
I'll have to test this myself.

Upon testing it actually seems like the following code in the App constructor is enough to maximize the window...
graphics = new GraphicsDeviceManager(this) {
    PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width,
    PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height,
};
graphics.ApplyChanges();

I had tried this originally but at least on windows, it doesn't actually maximize the window, just resizes it to fit the screen (though goes past the task bar), but it's technically still in windowed mode.

as opposed to actually maximizing the window:

I see, so I guess it depends on the platform...
Weirdly enough, calling SDL_MaximizeWindow on the window handle doesn't work at all on my Linux machine, which is weird because SDL_MaximizeWindow definitely works by itself in an SDL game. What happens on your side if you do both the graphics.ApplyChanges() code above and also call SDL_MaximizeWindow(Window.Handle) in Initialize?

Update: I just tried the combination of both on my dad's very very slow Windows 10 computer. It was extremely painful but it works :v

I don't know what the best practices are for this kind of thing but I'm wondering if it's a good idea to make a class that handles system specific stuff (like playing system sounds, getting the window to maximize/subscribe to an onclosing event) with a preprocessor conditionals for each platform.

I'm not sure. So far there's only one place where Windows system sounds are being played so I wouldn't create a class just for that. And as for the onclosing event, I'll have to see how I'm gonna revive the exit-save dialog.
In my opinion, the best, most ideal way to support every platform would be to use something other than Monogame, maybe with SDL3 for windowing as a base. One huge advantage is that it could then run natively on Mac M1, M2 etc. devices, because apparently Monogame doesn't support Arm64. :c
But that would take a long time (sure, the rendering code is all in the Graphics class and it wouldn't need to change much, but lots of classes use Monogame's various other things like the game loop and retrieving keyboard/mouse state) so I guess hacking around things like I'm doing for maximizing here is more viable as it stands.

WOW! this looks 90% done. Well done sir.

For the audio file formats, I'm thinking of copying the audio file reading code from NAudio again, but I'm also contemplating the option of using FFmpeg through something like FFMediaToolkit and an embed of the FFmpeg runtime libraries... Unfortunately there isn't anything close to Symphonia in the C# ecosystem it seems. :/

Once this pull request is finished, does this mean that macOS support is also added?

Yeah, somewhat, though it doesn't mean that MacOS will be supported yet. The key blocker for MacOS is that Monogame doesn't support Arm, so WaveTracker currently cannot support Macs with M1/M2 processors natively... There's a tool for Mac to run x64 programs on Arm, I'll have to see if I can use that.

was curious because i want to see if i can get it on my school's macs >:3

I just realized that if I want to use SDL_MaximizeWindow to maximize the window, I can't make Windows use Monogame's DirectX backend, because that one doesn't use SDL under the hood. So either I have to make WaveTracker use DesktopGL on every platform, or I somehow make it so that on Windows it binds the window to a Windows form and maximizes that like it was doing before... :/

My Windows VM was so slow that it was starting to be really painful to test anything, and my dad's Windows laptop was no better.  I can finally be productive again

For the audio file formats, I'm thinking of copying the audio file reading code from NAudio again, but I'm also contemplating the option of using FFmpeg through something like FFMediaToolkit and an embed of the FFmpeg runtime libraries... Unfortunately there isn't anything close to Symphonia in the C# ecosystem it seems. :/

@squiggythings I'd love your input on this. Do you think it's a good idea to go with FFmpeg here or should I just copy NAudio?

@Speykious I think FFmpeg seems like a good idea. If I'm understanding correctly it seems like that would have much more comprehensive support for almost all the other audio formats such as .ogg (#57) ? I also wonder though, would that allow being able to play/audition/loop the files directly when navigating through the browser without needing to read them to float arrays and then send it through wavetracker's audio engine, which can be a bit slower to initially import a file and would cause a noticeable hang when skimming through a bunch of samples in the browser, especially with longer samples.

It could allow that, yeah. I'll try focusing on just implementing the simplest FFmpeg code for now though. :D

On Windows, it's somehow not able to load the FFmpeg libraries even though the path is correct (I checked like 10 times)...

@Speykious This is the log I get when trying to debug using VSC 2022 on Windows 10:
'WaveTracker.exe' (CoreCLR: DefaultDomain): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Private.CoreLib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded '.\WaveTracker\WaveTracker\bin\Debug\net8.0\WaveTracker.dll'. Symbols loaded.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'c:\program files\microsoft visual studio\2022\community\common7\ide\commonextensions\microsoft\hotreload\Microsoft.Extensions.DotNetDeltaApplier.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.IO.Pipes.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Collections.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Console.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Threading.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Runtime.InteropServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Threading.Overlapped.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Security.AccessControl.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Security.Principal.Windows.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Security.Claims.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Runtime.Loader.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Collections.Concurrent.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded '.\WaveTracker\WaveTracker\bin\Debug\net8.0\MonoGame.Framework.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded '.\WaveTracker\WaveTracker\bin\Debug\net8.0\FFmpeg.AutoGen.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\netstandard.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.ComponentModel.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Threading.Thread.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Text.Json.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded '.\WaveTracker\WaveTracker\bin\Debug\net8.0\WaveTracker.Midi.dll'. Symbols loaded.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Memory.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Text.Encoding.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Text.Encodings.Web.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Runtime.Intrinsics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Numerics.Vectors.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Private.Uri.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Reflection.Emit.Lightweight.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Reflection.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Reflection.Emit.ILGeneration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Runtime.Serialization.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded '.\WaveTracker\WaveTracker\bin\Debug\net8.0\protobuf-net.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Exception thrown: 'System.Text.Json.JsonException' in System.Text.Json.dll
'WaveTracker.exe' (CoreCLR: clrhost): Loaded '.\WaveTracker\WaveTracker\bin\Debug\net8.0\FontStashSharp.MonoGame.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.10\System.Text.RegularExpressions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded '.\WaveTracker\WaveTracker\bin\Debug\net8.0\FontStashSharp.Base.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded '.\WaveTracker\WaveTracker\bin\Debug\net8.0\FontStashSharp.Rasterizers.StbTrueTypeSharp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaveTracker.exe' (CoreCLR: clrhost): Loaded '.\WaveTracker\WaveTracker\bin\Debug\net8.0\StbTrueTypeSharp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Exception thrown: 'System.DllNotFoundException' in FFmpeg.AutoGen.dll
An unhandled exception of type 'System.DllNotFoundException' occurred in FFmpeg.AutoGen.dll
Unable to load DLL 'avutil.56 under .\WaveTracker\WaveTracker\bin\Debug\net8.0\runtimes\win-x64\native': The specified module could not be found.

In the .\WaveTracker\WaveTracker\bin\Debug\net8.0\runtimes\win-x64\native folder I have three files: nfd.dll, SDL2.dll, and soft_oal.dll. Maybe this information will be of some use?

Sorry, I forgot to push changes to the Windows path. That path in your logs is not correct since FFmpeg puts them under win7-x64 instead. I'll push my latest changes soon.

Oh my god... The warning was right there and I ignored it until now...!
C:\Program Files\dotnet\sdk\8.0.403\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(284,5): warning NETSDK1206: Found version-specific or distr
       ibution-specific runtime identifier(s): win7-x64, win7-x86. Affected libraries: FFmpeg.Native. In .NET 8.0 and higher, assets for version-specific and dis
       tribution-specific runtime identifiers will not be found by default. See https://aka.ms/dotnet/rid-usage for details.

Turns out the answer was actually a huge hack that involves modifying the process's path because Windows can't do it by itself -_-

I wonder if I should remove the unused MIDI events in WaveTracker.Midi. They probably take most of the 7k lines of code in this PR.

That only removed 2k lines??? damn

The "Open themes folder..." button in Preferences -> Colors seems to be hardcoded to open explorer, and crashes under Linux:
Unhandled exception. System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'explorer.exe' with working directory '/home/knuxify/clones/WaveTracker'. No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at WaveTracker.UI.ConfigurationDialog.AppearancePage.Update() in /home/knuxify/clones/WaveTracker/WaveTracker/Source/UI/ConfigurationDialog.cs:line 475
   at WaveTracker.UI.ConfigurationDialog.Update() in /home/knuxify/clones/WaveTracker/WaveTracker/Source/UI/ConfigurationDialog.cs:line 298
   at WaveTracker.UI.Dialogs.Update() in /home/knuxify/clones/WaveTracker/WaveTracker/Source/UI/Dialogs.cs:line 84
   at WaveTracker.App.Update(GameTime gameTime) in /home/knuxify/clones/WaveTracker/WaveTracker/Source/App.cs:line 359
   at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop()
   at WaveTracker.Program.Main(String[] args) in /home/knuxify/clones/WaveTracker/WaveTracker/Source/Program.cs:line 16
Aborted

Could probably be changed to use xdg-open instead(?).

Oh, thanks for the catch! That completely went past me.

Hey apologies it has taken me so long to take a look at this! I have been incredibly busy the past few weeks. A couple things I'm noticing/having trouble with (on windows):

I think this is a known bug with monogame using DesktopGL that it doesn't use the custom Icon.ico, even when it is set to use one it will default to the monogame logo instead of the wavetracker logo. If anyone knows of a workaround or fix for this please let me know!
I'm noticing some stuttering with visuals if the buffer length is set too high, especially noticeable with the visualizer. I'm probably misunderstanding something fundamental about how the new audio engine is working but it almost seems as if the drawing code is waiting for the audio buffer to be filled before it draws again whereas previously the drawing code would just access channel and playback data mid-buffer in whatever state it was at the point the draw was called.

Ok, I compared both branches today and I can definitely see the difference in visual stutter. The main branch just appears to be delayed while my PR branch appears to wait every time after a bit. I think it's gonna take a little while to figure out what's causing this.

Turns out it might be simpler than I expected. It's already fixed on Linux, I just needed to set Alsa to write audio in non-blocking mode, and just wait at the beginning of the write if it happens to be busy.
I hope that it's gonna be as simple for Windows now :v

As a side note, before the minimum latency I could have before the audio bugs out was 15 ms, now it seems to be 25 ms instead.

FINALLY I have a solution to this problem... I noticed that it just wasn't waiting any time in between the writes, so I made it wait manually. Let me know if there's any issue left. I think I fixed any issue related to underflow but I'm not 100% sure.

Nevermind, clipping still appears after running the app for about 1 minute... Not sure what to do about it.


is-subset always returns true for date values

For values that are dates is-subset will ignore the values and return true when the dates are different.
For example:
is-subset(
    { date, new Date(0)}
    { date, new Date()}
)

will return true even though the dates are different.  Looking at the code this is because Object.keys() for a Date will return an empty array.
Something like
  if (
    superset instanceof Date && subset instanceof Date
  ) return superset.valueOf() === subset.valueOf();

after the typeof object check should fix it.  I started trying to fix the issue but couldn't get any of the tests to run - getting TypeError: undefined is not a function for each test.

Hi, thanks for the heads up!
I’ll have a look at it next week when I’m back from vacation.

Closed through #6. (Thanks, @petergphillips!)


Support Design Tokens

Hey team! Don't know if this is the correct channel to ask this, and I apologize if it isn't, but are there any plans to support the Design Tokens Format being worked on by W3C and the design community?
I'd be great if we could have a schema and specification, like we do now for components, that could output the variables inside Figma with code connect.

Thanks for your comment! As of now, we don't have plans for supporting tokens as part of Code Connect. However, we shared an example of how to use the Variables REST API to do so here. This could run in parallel to Code Connect in CI for example. Would this work for your use case? If not, what'd you like to see in a Tokens integration?

Thanks so much for getting back to me! I poked around that repo and it's a great resource, thank you. I like the idea of running them in parallel too. Might create some custom scripts to do the same during development just make things a little nicer to use.
With regards to features for Tokens and Code Connect I had a few ideas.
It would be nice is this syncing process was seamless and we could used a .figma.tsx file to sort of define the tokens "schema". For example, for components we are able to point a  Figma component property to a specific React component:
import React from "react"
import figma from "@figma/code-connect"

import { Button } from "./index"

figma.connect(
  Button,
  "figma-url",
  {
    props: {
      icon: figma.enum("Left Icon"),
    },
    example: (props) => <Button {...props} />,
  }
)

In this example the Left icon property becomes the icon prop.
It'd be great if we could do something similar with Tokens too through a definition file like this one. Imagine being able to do this:
figma.tokens(
  "radius",
  {
    "sm": (val) => convertToRem(val)
  }
)

This might be a silly example but, in this case the collection of variables named radius has an sm variable which we convert in code from a fixed value to a relative rem value.
Another great thing would be if Code Connect then used this to converted the tokens into different formats like CSS variables, Sass variables, etc.


fix: data updates when modifying preview

there was a bug where the form data was not correctly updated when editing the preview in the editor. for example if you add a value to an input, it is expected that this would add a value in the field edit window. likewise when checking a checkbox or clicking a radio button, the options in the edit window should reflect the choice from the preview.
this PR adds back some tests and minor performance improvements to prevent unnecessary dom re-render

:tada: This PR is included in version 2.2.2 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


No Access to 'GetPositionsForAddressAsync'

Bug Information
Unable to access the GetPositionsForAddressAsync method.
Version Number of Plugin: 4.0.1
Device Tested On: Windows Desktop
Simulator Tested On: NA
Version of VS: 2017
Version of Xamarin: <IP_ADDRESS>7
Versions of other things you are using:
Screenshotst

It's not released yet


Error: Invalid LatLng object: (undefined, undefined)

Describe the bug
I have added the leaflet-tracking-marker to my project( which is for now a map with simple markers), and followed the same code example hosted in codesandbox link ,
But it doesn't rendering anything ( the hole map), and it showed me in the console this error :

Uncaught Error: Invalid LatLng object: (undefined, undefined)

at new LatLng (LatLng.js:32:1)
at Object.toLatLng [as latLng] (LatLng.js:123:1)
at NewClass.initialize (BaseMarker.js:23:1)
at new NewClass (Class.js:22:1)
at createMarker (LeafletTrackingMarker.js:42:1)
at useMutableLeafletElement (element.js:10:1)
at useLayer (layer.js:21:1)
at ContainerComponent (component.js:6:1)
at renderWithHooks (react-dom.development.js:14985:1)
at updateForwardRef (react-dom.development.js:17044:1)
A capture of the Map.js file is attached(the tracker marker in this case is called MovingMarker in the last lines)
Any help will be appreciated

Hello @MoussaRiad,
const [currentTrack, setCurrentTrack] = useState({});

In my example, the "currentTrack" is an object not an array, it represents one coordinate of your marker, latitude and longitude, defined by an object with two properties, "lat" and "lng".
I then destructure this "data" object and send its  "lat" and "lng" values to the tracking marker as an array (see the code snippet bellow)

But this is just my example, you can handle your data differently in your project as long as you make sure that you are sending  the "position" and "prevPos" to **LeafletTrackingMarker ** in the required format.
<LeafletTrackingMarker icon={icon} position={[latitude, longitude]} previousPosition={[previousLatitude, previousLongitude]} />


[Source Request]

PLEASE READ THIS
I acknowledge that:

I have checked that the extension does not already exist:

In the list of existing extensions in the application
In the multi-source spreadsheet: https://tachiyomi.org/extensions
By searching the GitHub repository for the extension and verify it does not appear in the code base

I have searched the existing GitHub issues and this extension does NOT have an open request
I will fill out the title and the information in this template

Note that the issue will be automatically closed if you do not fill out the title or requested information.
DELETE THIS SECTION IF YOU HAVE READ AND ACKNOWLEDGED IT

Source website

Name: Nekopoi
Link: https://nekopoi.care/
Language(s): Indonesia

Other details
Streaming Anime Hentai 18+

i've made the latest/pupular and detail anime parse for this
https://github.com/MoonLGH/aniyomi-tachiyomi-ext/tree/kucingpoi/src/id/nekopoi
im stuck with the video url parse cause this web sometime doesnt have streaming for the hentai

Closing as site is not responding


num_rational::Ratio: Add the ability to format as a decimal

Ratio's Display implementation formats as a fraction (e.g., 17/42). It would be useful if there were a way to format instead as a decimal (e.g., 0.4047619048).

This issue was moved to rust-num/num-rational#10


Retry request to extension gallery for raw gallery extensions

This change might unblock @alexr00 in vscode.dev since this particular request fails on a daily basis for her.

@joyceerhl I do not understand the reasoning for re-try. I think adding a re-try to request service is not correct, we do not want a base feature to retry if fails by itself. It shall be the caller of the service.
Before adding the re-try, may I understand the issue here?

AlexR sometimes sees the explorer in vscode.dev/github fail to load entirely, and this is in the log when that happens
log.ts:324   ERR RequestService#request (browser) - error https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery Error: XHR failed

but a page reload usually fixes things so it seems like a transient error that we should be handling with retry logic.
This PR doesn't retry requests by itself, it just adds an option so that callers of the request service can easily add retries by passing an option, but if no retries option is passed it will attempt the request just once. I added it as an option to the base request service because we may want additional retry logic elsewhere to improve the reliability of the VS Code for the Web experience, but this is a starting point for now.

I am not convinced about adding retry to request service. IMO It's same as adding retry to browser fetch api. We shall also not retry always, sometimes the error is indeed valid.
Regarding the error that is seen, there seems to be a real error some where which needs to be diagnosed and addressed. I see that our logs are not giving enough info about this error. Can we please ask to provide dev tools console log and also network requests trace to get more information and understand?

I copied the logs to https://github.com/microsoft/vscode/issues/164467

Closing this PR as the associated issue is redundant now


feat(graph): straight multiple edge. close #18424

Brief Information
This pull request is in the type of:

[ ] bug fixing
[x] new feature
[ ] others

What does this PR do?
Extend the possibility to support multiple edges betwen two node in graph using offset parameters.
Fixed issues

#18424

Details
Before: What was the problem?

After: How does it behave after the fixing?

Document Info
One of the following should be checked.

[ ] This PR doesn't relate to document changes
[x] The document should be updated later
[ ] The document changes have been made in apache/echarts-doc#xxx

Misc
ZRender Changes

[ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs
graph-offset.html
graph-multiple-edges-offset.html
Others
Merging options

[x] Please squash the commits into a single one when merging.

Other information

Hello @Ovilia, offset is a fixed value in pixel and when the width of all lines are larger than the size of the node graph edges are collapsed. This procedure take in consideration also the zoom level, so zomming in or out can cause the shrinking or the expansion of edges.

Hello @Ovilia,
you are right, I had made some wrong considerations about rendering. Now I should have fixed the logic taking into account the zoom when applying the offset.


Null Safety

Is it possible to make this package null safe?
I'm using this package for my chatbot app and planning to move to null safety since of the other packages requires null safety.

Sure!
I'll push an update in day or two
Thanks!

Update in latest version pls check

Thank you @GoyalSidhant


publish to copr

would it be possible to have a fedora copr packadge that could potentially become get into the main repos?

You could also make a build guide for fedora since I am having difficulties, I get the error:
meson.build:130:0: ERROR: Dependency "freetype2" not found, tried pkgconfig and cmake

I'd rather not make a Fedora package myself if it can be helped, as I don't use Fedora. If someone else wants to that's cool though.
For building it yourself, it looks like you just need to install the development dependencies:
freetype-devel
cairo-devel
pango-devel
wayland-protocols-devel
libxkbcommon-devel
scdoc

Thanks.

For anyone who is trying to install to fedora I also had to install
wayland-devel
wayland-protocols-devel

philj56 would you be happy for me to make a PR that adds a fedora build guide to the readme

philj56 would you be happy for me to make a PR that adds a fedora build guide to the readme?

:+1: I'm also happy to do it if you want, I guess it just needs to be an extra line in the Building section with the devel dependencies listed? Those are similar for Debian etc. as well.

Created PR here may create built-from-source fedora COPR package later


[SE-0292] Reschedule the review

Suggestion: reschedule for the day after the current SE-0291 review ends.

cc @airspeedswift

Fixed in commits ca098b376463f957dedf09e2409cabcee040f3f6 and 93f1743aaff26bf363f4b2d3bd29d16fdeca2432.


Update free-courses-bn.md added krish naik python course

What does this PR do?
Add resource(s) | Remove resource(s) | Add info | Improve repo
For resources
Description
Why is this valuable (or not)?
How do we know it's really free?
For book lists, is it a book? For course lists, is it a course? etc.
Checklist:

[ ] Read our contributing guidelines.
[ ] Search for duplicates.
[ ] Include author(s) and platform where appropriate.
[ ] Put lists in alphabetical order, correct spacing.
[ ] Add needed indications (PDF, access notes, under construction).
[ ] Used an informative name for this pull request.

Follow-up

Check the status of GitHub Actions and resolve any reported warnings!

Consider moving to courses/free-courses-en.md as the course content is in English.

Thanks, and welcome to free-programming-books!


End message stream once message generation is done.

Description

Risk

Deploy Plan

What's the motivation ooc?

Ahah let me add the description.


As a user I need to apply a custom header to all outboun mail.  For systems that use sendgrid as a smarthost.

As a user I need to apply a custom header to all outboun mail.  For systems that use sendgrid as a smarthost.

Hello @SquirrelAssassin ,
We're sorry you're having this issue! Since this is not a docs-related issue, please contact our Support team directly and they can help you out. You can access support contact options by logging into https://support.sendgrid.com.
SendGrid Docs Team


(refactor) some opportunities to use lambda functions

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

lambda 需要较高的JDK版本,但是我们的需要兼容低版本


Please provide sdkman-init command.

Congrats updating sdkman from gvm.
By the way, after updating from gvm, sdk command is not recognized by new another terminal.
The cause might be that gvm selfupdate force doesn't providing code for running sdkman-init.sh.
Could you provide the following code to .bash_profile?
export SDKMAN_DIR="/Users/name/.sdkman"
[[ -s "/path/to/user/.sdkman/bin/sdkman-init.sh" && -z $(which sdkman-init.sh | grep '/sdkman-init.sh') ]] && source "/path/to/user/.sdkman/bin/sdkman-init.sh"

This should be fixed now, it was due to the fact that OSX provided a non-standard version of sed. It's been released as 3.0.1.

:+1:

Could I please ask you to change the page that you have published regarding how to updated sdkman from gvm, as it is causing much confusion. None of these points are necessary as they were fixed very soon after the release (v3.0.2).


[Umbrella][KPIP-1] Support RESTful API for Kyuubi

Describe the proposal

See the proposal document: #917
Task list

[x] #952 @yanghua
[x] #979 @yanghua
[x] #983 @yanghua
[x] #999 @yanghua
[x] #1011 @yanghua
[x] #1031 @yanghua
[x] #1052 @yanghua
[x] #1088 @yanghua
[x] #1092 @yanghua
[x] #1102 @yanghua
[x] #1106  @simon824
[x] #1135 @cfmcgrady
[x] #1258 @simon824
[x] #1275 @simon824
[x] #1294 @simon824
[x] #1351 @simon824
[ ] #1444 @simon824
[x] #1612
[x] #1611
[x] #1614
[x] #1620 @simon824
[x] #1575 @simon824
[x] #1631
[x] #1639
[ ] #1672 @yaooqinn

这个功能好

seems all of them are completed.
should we mark it as finished? @yanghua

seems all of them are completed.
should we mark it as finished? @yanghua

It's not completed yet, still having many things to do.

ping @yanghua @simon824, branch-1.5's been cut. Does anything more need to be fixed in this ticket? Otherwise, we shall mark this work as completed.
BTW, I notice that we have nothing in doc about this feature, right? It's not good for our users to use this feature.

ping @yanghua @simon824, branch-1.5's been cut. Does anything more need to be fixed in this ticket? Otherwise, we shall mark this work as completed.
BTW, I notice that we have nothing in doc about this feature, right? It's not good for our users to use this feature.

Yes, it can be marked as completed, if there is any bug in the future, can ping me to fix , and I will add the document later.

@simon824 thanks for the confirmation. actually, they're a lot of APIs through Rest, we can summarize and improve them in the future.


revise allergy branch

Creating a new ticket that combines https://github.com/monarch-initiative/mondo/issues/498 and https://github.com/monarch-initiative/mondo/issues/5856.
Action items:

[ ] obsolete allergy terms that come from DO (obsoletion tags have already been added)
[ ] @sabrinatoro you mentioned that you wanted to create a new pattern that would group the remaining terms by location, right?

Exclusion reason:

[ ] create exclusion reason “MONDO:excludeAllergy”. This new exclusion term needs to be defined and added to the exclusion code list (and communicated to the technical team)
[ ] add exclusion reason here too: https://docs.google.com/spreadsheets/d/18V-_j4b22LzCytxFEM3pBEl6-_ODJY06gpUwH0F6JVY/edit#gid=1644570180
[ ] Also, we need to update the excluded term list in the ingest (@sabrinatoro can do it and work with Joe to update DO update)

@nicolevasilevsky I have questions/comments about the MONDO:excludeAllergy code added here

the code name should be "allergy" not "phenotype"
is "allergy" considered a phenotype? (if so, it would need to be under phenotype).
in the "notes", it would be helpful to add what "allergy" terms are added, versus which one are not added.
generally, I am not sure I understand fully which term would be in Mondo and which one wouldn't. I think we talked about adding "some" terms (I need to review my notes). We should have a very clear description of what is "allergy", and which one we are excluded.

discussed on curation call - Sabrina is going to put together a proposal for how to handle allergy terms.
This affects the mapping/sync because we need to know how to handle allergy terms from external ontologies and if they should be diseases or phenotypes.

to do:

[ ] add exclusion code "MONDO:excludeAllergy"

[ ] update exclusion list

[ ] update exclusion document

[ ] add "MONDO:mondoIsNarrowerThanSource" for terms that are too specific so we keep track of these mappings

[ ]  de-obsolete MONDO:0002497 food allergy

[ ] obsolete all children terms of "food allergy" (to do: list of all the terms to be obsoleted as these obsoletions are spread through several issues)

Terms to obsolete:

Mondo ID
label
consider or replaced by?

MONDO:0000770
shellfish allergy'
MONDO:0700226 - food allergy

MONDO:0005902
peanut allergic reaction'
MONDO:0700226 - food allergy

MONDO:0005849
milk allergic reaction'
MONDO:0700226 - food allergy

MONDO:0000769
chicken egg allergy
MONDO:0700226 - food allergy

MONDO:0000778
fruit allergy
MONDO:0700226 - food allergy

MONDO:0000781
cherry allergy
MONDO:0700226 - food allergy

MONDO:0000782
Indian plum allergy
MONDO:0700226 - food allergy

MONDO:0000783
orange allergy
MONDO:0700226 - food allergy

MONDO:0000784
melon allergy
MONDO:0700226 - food allergy

@nicolevasilevsky should it be "consider" or "replaced by"?

consider


Roles with environment permissions are not support

Hi,
When managing rolegroup roles, the "context_params" property only handles "org". It is missing the "envId" property, to be able to assign/manage environment permissions for a rolegroup.

Hi @NunSant.
Thank you for reporting this. Would you be able to investigate the kind of request necessary to implement this ?
We need to update the spec of the rolegroup roles resource


[Relay Mining] Implement Supplier driven RelayMiningDifficulty

Objective
Prevent malicious Gateways from abusing on-chain RelayMiningDifficulty to get free Relays by sending low enough volumes to Suppliers that result in empty trees.
Origin Document
Potential Exploit in On-Chain Relay Mining Difficulty: Unclaimable Relays
The current on-chain RelayMiningDifficulty mechanism may be vulnerable to abuse, making Suppliers perform unclaimable work.
Malicious Gateways could exploit this by sending relays with volumes low enough to avoid triggering a relay mining process. By duplicating this process across multiple Applications, they could scale the exploit, leading to free work performed by Suppliers.
For more details, please refer to RelayMiningDifficulty-and-low-volume Notion document.
Goals

Implement Supplier-driven RelayMiningDifficulty
Disable (remove?) on-chain based RelayMiningDifficulty
Ensure that very low volume (a few Relays) are still claimable.

Deliverables

[ ][@adshmh] A single PR that:

Implements Supplier driven RelayMiningDifficulty based on RelayMiningDifficulty-and-low-volume#Algorithm
Verify Proofs using the RelayMiningDifficuly available in the corresponding Claim.
Use the RelayMiningDifficul available in the Claim to calculate the estimated volume; see #771
Rename ServiceRelayMiningDifficulty to SuggestedRelayMiningDifficulty based on overall on-chain usage

Used the above as a default if the claim doesn't specify a difficulty itself

Add min/max mined relays per claim parameters as constants.
Tests that ensure that low volume is claimable.

[ ][@red-0ne and/or @Olshansk] Update the documentation (at least in part) to reflect these changes (TODOs, links to docs, actual updates, etc...)

Imeplementation Direction
Implement Supplier-Driven Relay Mining Difficulty

Each Claim should specify the mining difficulty used to construct the SparseMerkleSumTree, which will be included in the MsgCreateClaim message.

This will be part of the claim object

During proof verification, the difficulty value should be retrieved from the respective Claim and used to verify whether the Relay satisfies the expected difficulty.
The global on-chain RelayMiningDifficulty should be updated to "suggested_difficulty"
Documentation needs to be updated that on-chain difficulty is a suggestion for suppliers to reduce their memory footprint but it is ultimately a supplier decision

Additionally, this difficulty will be utilized to estimate the processing volume for the corresponding session. This is done in #771
Non-goals / Non-deliverables

Create new governance parameters.
Look for the right parameters to use.

General deliverables

[ ] Comments: Add/update TODOs and comments alongside the source code so it is easier to follow.
[ ] Testing: Add new tests (unit and/or E2E) to the test suite.
[ ] Documentation: Update architectural or development READMEs; use mermaid diagrams where appropriate.

Creator: @adshmh
Co-Owners: @bryanchriswhite, @red-0ne

@red-0ne Will review this in detail by EOD. Please hold off from starting work on it just yet

Copying this from a message on discord last week:
I just put up [1] for review as part of the ticket I'm handing off in [2] (related to proportional rewards), which is a pre-req for [3] that @red0ne put together earlier this week.
Note that I left a lot of TODO(arash) in the PR as a guideline for where/what needs to be implemented.
This is ULTRA critical for tokenomics to work properly.
[1] https://github.com/pokt-network/poktroll/pull/771
[2] https://github.com/pokt-network/poktroll/issues/781
[3] https://github.com/pokt-network/poktroll/issues/818

@adshmh I wanted to call out that we need to finish #771 before this can be started.
@red-0ne

I have updated the description here. PTAL and see if there are any updates/changes needed.
My only open question is related to this commend. What do you mean by it?

Add min/max mined relays per claim parameters as constants.

Do you see other risks here where the supplier claims a high difficulty but actually inserted (in part) low difficulty relays into the tree? This could potentially be an attack as well, no?

@Olshansk,
min/max mined relays per claim are described here [1]
TL;DR;
MinMinedRelaysPerClaim: Since a Supplier is the one submitting the difficulty, it could submit a claim with only the most difficult relay thus leveraging any "luck" the supplier might have, which may not correspond to the actual work done.
MaxMindedRelaysPerClaim: On the other hand prevents the Supplier from submitting a claim with the easiest difficulty leading to long proof paths.
Example
With min = 3 and max = 5
And the following served relays difficulty: 1, 2, 3, 4, 5, 6, 7, 8, 9, 20
The supplier is not allowed to to submit the following claims:

{difficulty: 20, minedRelays: 1}
{difficulty: 2, minedRelays: 9}

But is allowed to submit:

{difficulty: 7, minedRelays: 4}

[1] RelayMiningDifficulty-and-low-volume#ProbabilisticError

Min/Max mined relays per claim are the equivalent of the targetNumRelays in the current setup

@red-0ne As discussed offline, do you think this is something we can do POST Mainnet?


Update README.md: fix typo

update: fix typo

recheck

@radiobenzene Can you sign the CLA so we can merge? Alternatively, I can open a PR with the fix

Signed


Various warnings and errors in logs: value errors, type errors, and deprecated attributes

Upon updating to v0.1.0 release, after removing and re-adding the integration, my Home Assistant instance completely froze. While checking logs to try learn what caused the crash, I came across numerous warnings and errors relating to this integration.
Several of them specifically state that they should be reported to the custom integration author. Apologies if my reporting approach is less than ideal. It's not clear if some of these errors/warning should be grouped or split into separate issues.
I should also point out that that's possible that some of these are associated with brief/intermittent network connectivity between the HA server and GX device.
Log snippets follow:
This error originated from a custom integration.

Logger: custom_components.victron.coordinator
Source: custom_components/victron/coordinator.py:76
Integration: victron (documentation, issues)
First occurred: May 9, 2023 at 6:56:04 PM (72 occurrences)
Last logged: 3:55:31 PM

no valid data returned for entities of slave: 100 if device was physically removed please force a rescan to resolve this issue
no valid data returned for entities of slave: 238 if device was physically removed please force a rescan to resolve this issue
no valid data returned for entities of slave: 237 if device was physically removed please force a rescan to resolve this issue
no valid data returned for entities of slave: 239 if device was physically removed please force a rescan to resolve this issue

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:572
First occurred: May 9, 2023 at 11:20:14 PM (14 occurrences)
Last logged: 3:50:18 PM

Updating state for sensor.victron_battery_history_lastdischarge_239 (<class 'custom_components.victron.sensor.VictronSensor'>) took 0.430 seconds. Please report it to the custom integration author.
Updating state for sensor.victron_vebus_battery_voltage_237 (<class 'custom_components.victron.sensor.VictronSensor'>) took 1.721 seconds. Please report it to the custom integration author.
Updating state for sensor.victron_battery_alarm_lowsoc_239 (<class 'custom_components.victron.sensor.VictronSensor'>) took 1.881 seconds. Please report it to the custom integration author.
Updating state for sensor.victron_battery_alarm_239 (<class 'custom_components.victron.sensor.VictronSensor'>) took 1.947 seconds. Please report it to the custom integration author.
Updating state for sensor.victron_system_pvonoutput_l1 (<class 'custom_components.victron.sensor.VictronSensor'>) took 1.776 seconds. Please report it to the custom integration author.

This error originated from a custom integration.

Logger: homeassistant.helpers.entity
Source: custom_components/victron/sensor.py:155
Integration: victron (documentation, issues)
First occurred: May 10, 2023 at 12:50:23 AM (74 occurrences)
Last logged: 3:02:03 PM

Update for sensor.victron_battery_alarm_internalfailure_239 fails
Update for sensor.victron_battery_alarm_highchargetemperature_239 fails
Update for sensor.victron_battery_alarm_lowchargetemperature_239 fails
Update for sensor.victron_battery_alarm_lowcellvoltage_239 fails
Update for sensor.victron_system_battery_state fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 554, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 784, in async_device_update
    await coro
  File "/config/custom_components/victron/sensor.py", line 155, in async_update
    self._attr_native_value = self.entity_type.decodeEnum(data).name.split("_DUPLICATE")[0]
  File "/usr/local/lib/python3.10/enum.py", line 385, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/lib/python3.10/enum.py", line 710, in __new__
    raise ve_exc
ValueError: None is not a valid register_input_source

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/victron/number.py:202
Integration: victron (documentation, issues)
First occurred: May 9, 2023 at 10:35:37 PM (12 occurrences)
Last logged: 2:27:36 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 852, in _update_entity_states
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 572, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state
    if (state := self.state) is None:
  File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 366, in state
    return self.value
  File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 419, in value
    if (native_value := self.native_value) is None:
  File "/config/custom_components/victron/number.py", line 202, in native_value
    if value > round(UINT16_MAX/2): #Half of the UINT16 is reserved for positive and half for negative values
TypeError: '>' not supported between instances of 'NoneType' and 'int'

This error originated from a custom integration.

Logger: homeassistant.helpers.entity
Source: custom_components/victron/base.py:10
Integration: victron (documentation, issues)
First occurred: May 10, 2023 at 12:50:26 AM (141 occurrences)
Last logged: 12:57:20 PM

Update for sensor.victron_battery_diagnostics_lasterror_2_time_239 fails
Update for sensor.victron_battery_diagnostics_lasterror_3_time_239 fails
Update for sensor.victron_battery_diagnostics_lasterror_4_time_239 fails
Update for sensor.victron_battery_system_mincelltemperature_239 fails
Update for sensor.victron_battery_system_maxcelltemperature_239 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 554, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 784, in async_device_update
    await coro
  File "/config/custom_components/victron/sensor.py", line 153, in async_update
    data = self.description.value_fn(self.coordinator.processed_data(), self.description.slave, self.description.key)
  File "/config/custom_components/victron/base.py", line 10, in <lambda>
    value_fn: Callable[[dict], StateType] = lambda data, slave, key: data["data"][str(slave) + "." + str(key)]
KeyError: '100.settings_ess_batterylife_soclimit'

This error originated from a custom integration.

Logger: homeassistant.core
Source: custom_components/victron/number.py:202
Integration: victron (documentation, issues)
First occurred: 1:15:32 PM (1 occurrences)
Last logged: 1:15:32 PM

Error executing service: <ServiceCall number.set_value (c:01H060CM0KW5EJ4PRB3RN3RWGF): value=7094.0, entity_id=['number.victron_settings_ess_acpowersetpoint']>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1867, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1889, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 226, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 815, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 572, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state
    if (state := self.state) is None:
  File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 366, in state
    return self.value
  File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 419, in value
    if (native_value := self.native_value) is None:
  File "/config/custom_components/victron/number.py", line 202, in native_value
    if value > round(UINT16_MAX/2): #Half of the UINT16 is reserved for positive and half for negative values
TypeError: '>' not supported between instances of 'NoneType' and 'int'

Logger: homeassistant.helpers.service
Source: helpers/service.py:757
First occurred: May 9, 2023 at 5:39:15 PM (406 occurrences)
Last logged: 1:16:17 PM

Unable to find referenced entities number.victron_settings_ess_acpowersetpoint or it is/they are currently not available`

`Logger: homeassistant.components.number
Source: components/number/__init__.py:159
Integration: Number (documentation, issues)
First occurred: May 9, 2023 at 6:14:11 PM (187 occurrences)
Last logged: 1:16:17 PM

custom_components.victron.number is setting deprecated attributes on an instance of NumberEntityDescription, this is not valid and will be unsupported from Home Assistant 2022.10. Please report it to the custom integration author.

Since reporting this issue, I've hard-wired my RPi running Venus OS (acting as a Cerbo). I've also confirmed that my Home Assistant server isn't overloaded, and still encountered the following warning:
WARNING (MainThread) [homeassistant.helpers.entity] Updating state for sensor.victron_system_charger_power (<class 'custom_components.victron.sensor.VictronSensor'>) took 1.824 seconds. Please report it to the custom integration author.
Just thought you should know that this particular warning might not be related to stability of the connection.


Add type-the-alphabet extension

Description

Screencast

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

Hi @Visual-Studio-Coder 👋
Are you okay with the improvements I made? 🙂

I kept some of your changes, but I can't really add ALL of your changes because I want to keep as many of the same formatting as the https://typethealphabet.app website has.


selecting a chat should not follow links in the first message

If I click in the list of messages, I might click in the lower half of the box and if the sender sent me a link, OB opens that link in addition to selecting that chat.
Please disable links in the Messages list.

Good catch.

If I send a chat message with a link and then try to click that link from the chat head, it does not follow the link, it just opens up the chat conversation box at the bottom. If I click on the link within the chat conversation box, it does open the link in the browser. I believe that's the correct behavior.
Perhaps the bug has been fixed, or perhaps I'm completely misunderstanding it? Can anyone please confirm.

It happens if they embed the link as link, at least on my copy of master using Windows.

hmm... pretty odd. Might be a Win only thing, because on my mac, that's what I did and it didn't follow the link.

@rmisio and @jjeffryes Cannot reproduce on Linux. Still an issue on other OS?

I can't reproduce it on Windows.

I couldn't on OSX. Looks like a Win issue.


Improve the SparseIR.refine_grid function

This PR improves the implementation of SparseIR.refine_grid and adds tests for the function.

Thanks, I didn't think of this edge case! However, the function is now type unstable for integer inputs. Also, in the empty case, the output aliases the input.
I'd propose using newn = max(..., 0) instead.
(on my phone, so haven't actually tested)

The following implementation causes e.g., max(α * (n - 1) + 1, 0) can't treat for the case isempty(grid) is true
function refine_grid(grid::Vector{T}, ::Val{α}) where {T, α}
    n = length(grid)
    newn = max(α * (n - 1) + 1, 0)
    newgrid = Vector{float(T)}(undef, newn)

    @inbounds for i in 1:(n - 1)
        xb = grid[i]
        xe = grid[i + 1]
        Δx = (xe - xb) / α
        newi = α * (i - 1)
        for j in 1:α
            newgrid[newi + j] = xb + Δx * (j - 1)
        end
    end
    newgrid[end] = last(grid) ## This line can't treat for empty case
    return newgrid
end

refine_grid(Float64[], Val(2))

#=
julia> [][end]
ERROR: BoundsError: attempt to access 0-element Vector{Any} at index [0]
=#

What about this?
From
function refine_grid(grid::Vector{T}, ::Val{α}) where {T, α}
    isempty(grid) && return grid

To
function refine_grid(grid::Vector{T}, ::Val{α}) where {T, α}
    isempty(grid) && return T[]

True, didn't even look at the last line. I like your solution, but suggest changing it to float(T)[] for type stability.

but suggest changing it to float(T)[] for type stability.

Yes!!! That makes sense.

Thank you!