Should UPath.__new__ return pathlib.Path instances for local paths

Summarizing from #84
When creating a UPath instance universal_pathlib returns a pathlib.Path instance for local filesystems, which can cause problems with type checkers:
from upath import UPath     # UPath is a subclass of pathlib.Path

pth = UPath("/local/path")  # returns i.e. a pathlib.PosixPath instance on non-windows
reveal_type(pth)            # Revealed type is "upath.core.UPath"

Possible solutions:
(1) user explicitly type annotates
No changes. We could just document it very explicitly.
pth: pathlib.Path = UPath(...)

(2) always return a UPath instance
I think the reason for returning a pathlib.Path instance for local filesystems is to guarantee that there are no changes in behavior when using UPath as a replacement.
(2A) create an intermediate subclass
We could still guarantee pathlib behavior by creating an intermediate UPath class

class UPath(pathlib.Path):
    def __new__(cls, *args, **kwargs):
        if ...:                         # is local path
            return cls(*args, **kwargs)
        else:                           # promote to a fsspec backed class
            return FSSpecUPath(*args, **kwargs)

    # > we could define additional properties here too `.fs`, etc...

class FSSpecUPath(UPath):
    ...  # provides all the methods current UPath provides

(2B) we always return the fsspec LocalFileSystem backed UPath instance for local paths
This would be a simple change, but I think we should then port the CPython pathlib test suite to universal_pathlib, to guarantee as good as we can that the behavior is identical. I'm worried that symlink support, the windows UNC path stuff, and other weird edge-cases will probably cause quite a few issues.
(3) apply some magic
We could provide UPath as an alias for the UPath class but cast it to type[pathlib.Path] to trick the static typecheckers. And we could fallback to some metaclass magic to make runtime typechecking work, but this would basically (partially?) revert the cleanup done here: #56

I thought, perhaps mistakenly, that this previous behavior was a good thing:
import pathlib
from upath import UPath

path = UPath(".")
assert isinstance(path, pathlib.Path)
assert isinstance(path, UPath)

The idea, or at least so I thought, was to enable tools that support pathlib objects to easily support upath objects with little or no code changes.
If needed to check for identity of the class, something like this might work:
type(path) in (pathlib.WindowsPath, pathlib.PosixPath)

I'm sure there were good reasons why this behavior was removed, but I'm not sure why, and would greatly appreciate any clarification for my own understanding.
I was never sure that my previous metaclass approach was the right way to do it because the instance check stuff felt hacky, but it did seem to achieve the behavior that I thought I wanted.  For reference, here's a simplified version of what that looked like:
class UPathMeta(ABCMeta):
    def __instancecheck__(cls, instance):
        return isinstance(instance, pathlib.Path)

    def __subclasscheck__(cls, subclass):
        return issubclass(subclass, pathlib.Path)

class UPath(pathlib.Path, metaclass=UPathMeta):
    ...

On a related note, I also think it would be cleaner to put the class resolution logic into get_upath_class, it seems fragmented to have some of that logic there and some in __new__.
I'm really just curious and interested in the pros and cons of various approaches, so I'd love any feedback.

Hi! Thanks for the repository, we were trying to find a way to work with multiple schemes and use the same API as pathlib, and this seems to be perfect for our usecase. We're trying to use UPath as well, and are encountering the same issue:
>>> isinstance(UPath("."), UPath)
False

This is causing some issues as we use UPath as both the constructor and the type validator. Given the previous example, I would always expect it to be True for any python class ...

Getting back to this... Would it be possible to get the old behavior back?

UPath subclasses Path which allows for this behavior:
assert isinstance(UPath("s3://..."), Path)
assert isinstance(UPath("."), Path) and not isinstance(UPath("."), UPath)

So, UPath can be used everywhere Path is accepted which allows for an easy upgrade path in an existing code base. There is still a way to distinguish between UPath and Path.
I don't think it is great to change the behavior through metaclasses, because that messes with static analysis tooling such as type checkers.
Perhaps the type checking issues would be resolved if the signature of https://github.com/fsspec/universal_pathlib/blob/main/upath/core.py#L152 would be changed to return Path instead of PT?

I have similar issues with validating values in Dagster. Which are supposed to be UPath, but are actually Path for local paths.

I would say as a general case that for a given class C type(C(*args, **kwargs)) != C is a weird pattern to me

the promotion to specialized subclasses is a common pattern, also used in stdlib pathlib

The usage in the standard library allows for isinstance(Path(*args, **kwargs), Path), even though that will always return a WindowsPath or PosixPath.
My current thinking is that this behavior is a bad thing:

assert isinstance(UPath("."), Path) and not isinstance(UPath("."), UPath)

My current preference would be to revert to the old behavior, but that might be because I'm not clear on how that is breaking static type checkers.  But since the consensus seems to be to avoid that approach, I would probably lean toward option 2B, while acknowledging the concern that it might run into some bugs in fsspec local file handling, but it is the backbone of this project, and those issues should be fixable.
I'd be curious what @barneygale would suggest as the most appropriate approach to inheriting from and being compatible with pathlib.

I'm not very familiar with this project so forgive me if I get something wrong!
For Python 3.13 (>12 months away) I'm hoping to add a pathlib.AbstractPath class. Users could then do:
pth: pathlib.AbstractPath = UPath(...)

UPath.__new__() would be free to return a pathlib.Path instance, which will be a subclass of AbstractPath.
However, Path is not a subclass of UPath, so this still feels weird to me. So I think I learn towards your option 2B.

the promotion to specialized subclasses is a common pattern, also used in stdlib pathlib

FWIW, I never liked this. If I were to design pathlib from scratch, I would remove the *PosixPath and *WindowsPath classes, and instead add a flavour argument to PurePath. This would remove the need for __new__() methods and guarantee that users get back the type they asked for.
Taking that approach in universal_pathlib would mean adding dedicated classes for HTTPPath, S3Path, etc, and probably adding a module-level function to parse a URI and return an appropriate path instance:
s3_pth: universal_pathlib.S3Path = universal_pathlib.S3Path('foo/bar', bucket='blah')
any_pth: pathlib.AbstractPath = universal_pathlib.parse_uri('...')

... but obviously that's quite different! So take it or leave it :)

Oh sorry, I see that there are already dedicated HTTPPath etc classes!

Thanks for the feedback!

FWIW, I never liked this. If I were to design pathlib from scratch, I would remove the *PosixPath and *WindowsPath classes, and instead add a flavour argument to PurePath. This would remove the need for __new__() methods and guarantee that users get back the type they asked for.

Is pathlib going to move in that direction further down? Looking at the current 3.12 implementation, it seems to be reasonable if we'd implement a filesystem_spec-url equivalent of posixpath/ntpath to be used as the flavour. In UPath we'd then select the filesystem flavour based on protocol.
Some of this functionality is already there.

Taking that approach in universal_pathlib would mean adding dedicated classes for HTTPPath, S3Path, etc, and probably adding a module-level function to parse a URI and return an appropriate path instance:

we kind of do this via the different implementations for specific filesystems.
UPath.__new__ then returns the specialized subclass (ie. the HttpPath, or an S3Path equivalent etc...) instead of a module-level function. But I see the appeal of the module level uri parse function.

Regarding `pathlib.AbstractPath`: I would be happy to contribute to this. `universal_pathlib` could be an early adopter to check if the implementation covers all use cases.

But since the consensus seems to be to avoid that approach, I would probably lean toward option 2B, while acknowledging the concern that it might run into some bugs in fsspec local file handling, but it is the backbone of this project, and those issues should be fixable.

Fully agree. It's just quite a bit of work to port the important parts of the test suite. But definitely doable.

This might be a terrible idea, but another option might be to backport the latest pathlib in place of option 2A.

We're basically doing this for python 3.7, 3.8 and 3.9 already 😄
Ultimately we have to do this, to avoid having to have different implementations on our side. We didn't do it for 3.11 because we were waiting for the new implementation in 3.12.

Is pathlib going to move in that direction further down?

Unlikely, but not impossible.
When users subclass AbstractPath, they should be able to choose between POSIX, Windows, or current-OS semantics. This can be done by setting _flavour to posixpath, ntpath, or os.path respectively. But the underscore at the beginning of _flavour will need to go, so PurePath.flavour will become a public attribute.
Users may then point out that there are two ways to check if a path uses Windows semantics (for example):

isinstance(pth, PureWindowsPath)
pth.flavour is ntpath

The first of these will not work for subclasses of AbstractPath.
If this situation proves very confusing, we might add a flavour argument to PurePath, turn the *PosixPath and *WindowsPath classes into pure protocols that check flavour and return PurePath when instantiated, and deprecate them.
But it's hard to project that far into the future, and the change would need to be extremely well motivated.
Ticket: https://github.com/python/cpython/issues/100502

Regarding pathlib.AbstractPath: I would be happy to contribute to this. universal_pathlib could be an early adopter to check if the implementation covers all use cases.

Fantastic, thank you. My plan at the moment is to add a tarfile.TarPath class, using a new pathlib._AbstractPath class under the hood. I'll ping you as soon as I have something you can play with!


Fails to provision containers on machines where the active user doesn't have a uid of 1000.

Prior to provisioning a Docker container for a given bug, BugZoo generates a environmental variables file as a named temporary file on the host machine. That file is then mounted at ./environment inside the provisioned container. At launch, the container calls `source "./environment" to load the values of environmental variables.
Since Docker retains ownership information during volume sharing, ./environment will have the same owner UID as the UID of the user on the host machine. All of the ManyBugs containers run with a docker user with uid=1000. On most Ubuntu installations, the "main user" has a uid of 1000, and so no error is observed. For multi-user installations (e.g., servers), the active user may not have a uid of 1000, and so the ./environment file will have a different UID to the UID of the docker user inside the container. The mismatch between the UID of the ./environment file and the docker user prevents the ./environment file from being source, which causes the provisioning process to fail.
An adequate solution would be to change ownership of the ./environment file using chown during the provisioning process.

@joerenzullo this may affect you on your compute cluster.

Thanks for the heads-up!
ASU are provisioning a private VM for me to use (I've asked for 64 cores), so I'll be sure to pay attention to this when they get that up and running for me.
It wasn't possible to use docker with the existing compute facilities because their work manager doesn't play nice w/ Docker (think they are using an older version of SLURM).

Changing ownership of the file at the beginning of the provisioning process manages to avoid this bug, but it also introduces another: when we try to delete the temporary file that we mounted inside the container, we no longer have permission to do so (since its UID matches the UID of the docker user inside the bug container).
To solve this issue, the temporary file should be mounted to /.environment.host (in a read-only mode), before being copied to /.environment.


[README.md] Contributor Section

Description
After clicking on the contributor section image it will show the full image instead of that it needs to show this section : https://github.com/Curious-Ecosystem/Curious-Connect/graphs/contributors
Screenshots
Current Look:

Required Look:

Any additional information?
No response
What browser are you seeing the problem on?
No response
Checklist

[X] I have checked the existing issues.
[X] I have read the Contributing Guidelines
[X] I have read the Code Of Conduct
[X] I joined onboarding group for knowledge flow and direct conversation and support from admins  Curious Developers Community - Curious Connect
[X] The changes don't break the code
[X] Please attach the screenshots and video of the development work once it is done
[X] If you need any help please join the default  (Google Meet Link)
[X] I am willing to work on this issue (optional).

Please assign this issue to me !


Finish the unknown user option to the web demo

when can we had this feature?

Hi @dista - we're not actively working on this feature. If you want to implement it and send it a PR I'd be happy to review and merge it.
-Brandon.


Polygon crawlers

Changes
Update existing crawlers to work with both Ethereum and Polygon node.

[x] Update arg parser of crawlers to work with polygon
[x] Update arg parser of nft to work with polygon (hardcoded Ethereum)
[x] Update deployment scripts

How to test these changes?

Related issues

@bugout-dev check

[ ] Merge PR https://github.com/bugout-dev/moonstream/pull/370

@bugout-dev check

[ ] Add env var MOONSTREAM_NONE_POLYGON_IPC_ADDR
[ ] Add env var MOONSTREAM_NODE_POLYGON_IPC_PORT

@bugout-dev check

[ ] Add env var MOONSTREAM_NONE_POLYGON_IPC_ADDR
[ ] Add env var MOONSTREAM_NODE_POLYGON_IPC_PORT


The application did not respond

Hi there, I’ve been using this bot for a little while now and it’s been working great, but in the past 24 hours I’ve noticed it’s not updating properly. I re added it and it just keeps throwing back, “this application did not respond”.

Same issue here

Yep me too

Sorry folks just seeing this. The bot does this sometimes due to network issues but goes away with a quick restart. Apologies for any downtime.


feat(airflow): Add --conf-source to DAG created with kedro-airflow

Description

Resolve https://github.com/kedro-org/kedro-plugins/issues/672
Development notes

Checklist

[ ] Opened this PR as a 'Draft Pull Request' if it is work-in-progress
[ ] Updated the documentation to reflect the code changes
[ ] Added a description of this change in the relevant RELEASE.md file
[ ] Added tests to cover my changes

Ready!

Great work, @ankatiyar ! The PR looks good, but I have one concern, I was following deployment manual for cloud services and tried to run
kedro airflow create --conf-source="plugins/conf-new_kedro_project.tar.gz"
I received an error:
Error: Invalid value for '--conf-source': Path 'plugins/conf-new_kedro_project.tar.gz' does not exist.
I believe that's because I don't have that file in my current folder, but it will be on cloud container after it will be unpacked in plugins folder, so I think maybe we don't need that strict check on DAG creation step?
Also it will be great to update deployment docs according to that new feature.

@DimedS you're right, I turned of the check to see if the path exists.

@DimedS Just wanted to check why resolved paths wouldn't work?

@DimedS Just wanted to check why resolved paths wouldn't work?

I think typically I'm creating a DAG in my local computer and it will be one absolute path and when I will run that DAG in some container in the cloud environment, absolute path to the same config will be different. So it's ok to use relative path, but not absolute.


Avoid unchecked arithmetic overflow / underflow

In Rust, the default signed and unsigned n-bit integer types exhibit different behavior on under/overflow in debug vs release mode. In debug mode, the arithmetic operations panic on under/overflow. In release mode, under/overflow wraps around modulo 2^n. This inconsistent behavior in debug vs release mode is undesirable; in any instance, either under/overflow is an error condition and should be treated as such in both debug and release mode, or it is not an error condition and it should wrap around in both debug and release mode.

The multiplication in PrimeField64::linear_combination_u64 for Mersenne31, on line 257 of mersenne-31/src/lib.rs.
The multiplication in PrimeField64::linear_combination_u64 for Mersenne31, on line 259 of mersenne-31/src/lib.rs.
In the implementation of dit_butterfly_inner in mersenne/src/radix_2_dit.rs, lines 133-148.
In the default implementation of TwoAdicSubgroupDft::coset_lde_batch, on line 93 of dft/src/traits.rs.
In the default implementation of SystematicCode::parity_len, on line 15 of code/src/systematic.rs.
In the implementation of interpolate_coset, on line 55 of interpolation/src/lib.rs.

@morganthomas, @dlubarov can we close this one, after #190 ?


Active project?

Hello i find this project interesting, is it still being worked on, thanks.

Hi,
Thank you for showing an interest in this project. Yes, there are few of the to-dos lined up, but I am currently having difficulty finding free slots in my schedule to work on them. But yeah, surely, I am going to work upon in near future!

Hi,
Thank you for showing an interest in this project. Yes, there are few of the to-dos lined up, but I am currently having difficulty finding free slots in my schedule to work on them. But yeah, surely, I am going to work upon in near future!

Thats great to hear, i would like to ask does this project allows to use own api ?
api for:

listing folder and its contents into filepad
uploading new created folder/file to own server
editing folder/file and saving directly to own server

reason: i would want users data to sync with the cloud service, thanks.

Yes, it's easy to connect this project with any datastore!

Add your new datastore in src/infrastructure/databases folder
Initialize localDirectoryDatabase with your own Datastore in DirectoryAdapter

Yes, it's easy to connect this project with any datastore!

Add your new datastore in src/infrastructure/databases folder
Initialize localDirectoryDatabase with your own Datastore in DirectoryAdapter

Very nice was able to make it work,
I see a lot that can still be added to this project, when i have free time also i can try to make pull requests too.
Great work.

Thank you for your feedback! Your contribution would be really helpful for this project.


FAQ rephrasing

This PR rephrases the FAQ section related to post-conditions to make it more clear.
Related to docathon issue.

moving to this pr


Unable to figure out how to map shortcut to script.

I see in the top of the script that is created, npp_shortcut Ctrl+Alt+Shift+F10'...
However I am not following how to make use of this.
Any help would be greatly appreciated.

If you have a script with //npp_shortcut Ctrl+F11 instruction on top presnt in the C:\Users\oleg.shilo\Documents\NppScripts then the plugin will load this script at N++ startup and bind it to the Ctrl+F11 shortcut.
So when you hit the key combination the script will be executed.

Greetings Oleg, I have added the lines as you stated just under  the //css_ref section
//css_ref C:\Program Files\Notepad++\plugins\NppScripts\NppScripts.dll
//css_ref C:\Program Files\Notepad++\plugins\NppScripts\NppScripts\NppScripts.asm.dll
//npp_shortcut Ctrl+Shift+F10
The files exist in my users\Documents\NppScripts folder, I have restarted N++, however still does not recognize the shortcut.
Anything I am mising?

Not sure, I would suggest you use the samples that come with the plugin as they are verified to work.
This way you can check if there is something unusual about your environment or with your script.
The easiest sample for testing is the "Format XML"

If you need to restore the missing or damaged samples you can always restore them from the plugin about box:

Just wanted to let you know, I did not check to see if there was conflicts, this is what it came down to.
Thanks for your help.


Validation Move Link Broken

In the Validate Move section, the link is broken.
https://docs.microsoft.com/en-us/rest/api/resources/resources/resources_validatemoveresources

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

ID: 76c1c185-685f-27e0-e634-844b510b1834
Version Independent ID: 09375778-5354-ab44-c5c6-94c2aebe34bc
Content: Move Azure resources to new subscription or resource group
Content Source: articles/azure-resource-manager/resource-group-move-resources.md
Service: azure-resource-manager
GitHub Login: @tfitzmac
Microsoft Alias: tomfitz

@lewislivingstone - thanks for this feedback. I have submitted a fix.


[FEATURE] Create simple query interface

Add new method of querying and modifying data through 'simple queries'
This interface should be implemented by all storage backends

Create/insert/add data into collection/table in database:
void simple_insert(string database, string collection, string json_value)
Find/search/query all matching entries:
string simple_find(string database, string collection, string json_simple_query)
Find first matching entry:
string simple_find_one(string database, string collection, string json_simple_query)
Replace first matching entry:
void simple_replace_one(string database, string collection, string json_simple_query, string replacement_json_value)
Delete all matching entries:
void simple_delete_all(string database, string collection, string json_simple_query)
Delete first matching entry:
void simple_delete_one(string database, string collection, string json_simple_query)

Simple query (uses syntax similar to that of MongoDB but there is currently no filtering):
{
    // field_1 == "value_1"
    "field_1": "value_1",

    // field_2 == "value_2" || field_2 == "value_4"
    "field_2": {
        "$or": [
            // ... conditions
        ]
    }

    // field_3 == "value_3" && field_4 == "value_4"
    "field_3": "value_3",
    "field_4": "value_4"
}


Fix double-slash in derived OIDC metadata URL

First of all thanks for the nice OIDC testing tool. Making good use of it :)
There's a small thing I noticed: it cannot fetch the OIDC issuer metadata from my local testing issuer (http://localhost:1234) because it derives the OIDC metadata URL http://localhost:1234//.well-known/oidc-configuration. The reason seems to be that at least in Firefox, url.pathname is / for uri = new URI("http://localhost:1234").
This small change aims to fix that (and uses a low-tech alert to show fetch issues).

Hi @shartte. Thanks for spotting this. I'm adding your change.
Later I'll probably look into better display of error message so that alert is not needed.


Feedback and review

UI is very smooth and light to use
Swap , Add Liquidity , Stake , Unstake ,Withdraw  works well
didn't find any bugs during the testnet feature test
Very fast transaction
Goodluck

address :
0x4881B8C19E9F4dbcFca5e0cEEe74F148Eb5939C6

@DonaldW19 Thank you for your testing and we hope to continue delivering high quality features and improvements!


feat(coral): Add filter for Environment and search field.

About this change - What it does

adds a select element to enables users to filter the Connectors by Environment
adds a search field to enable users searching by a Connectors name

Note

Filter by team will be in a separate PRs as I'm waiting for a little Backend change for that (we want to use teamId here to be consistent with the other requests, it currently still uses teamName)
The search is currently case-sensitive, this will be updated in the Backend

Recordings
(note: I only have Connectors in DEV and can't create Connectors requests on different Envs as a service is not running at the moment, that's why it looks weird in the recording. API calls work like expected and I will test that manually later when the service is up!)
https://user-images.githubusercontent.com/943800/231199064-b0a2798a-c83c-4d46-a6e1-29cc56241ec8.mov
Resolves: #982

i've noticed some inconcistancy with the parameter name: search, topic and now connectornamesearch.
Yes, true. Do you want to create a follow up ticket for that?

I'll go an check my failing pipeline 🤔  (I did run tests locally before pushing)

Yes, true. Do you want to create a follow up ticket for that?

Sure, can do.


globals should not support multiple initialisation instructions

I can't find this documented in the official specification, however the 'unofficial' specification indicates that the init field of globals (and data sections), is an 'instantiation-time initializer'
https://github.com/sunfishcode/wasm-reference-manual/blob/master/WebAssembly.md#global-section
These are single instructions, therefore the way we handle globals is currently incorrect, as illustrated by this test:
https://github.com/xtuc/js-webassembly-interpreter/blob/master/test/compiler/parsing/fixtures/watf/global/with-multiple-instrs-in-init/actual.wast
I've verified this by using the wat2wasm tool on the acbove actual.wast file, and it fails with the message:
error: invalid global initializer expression, must be a constant expression; either *.const or get_global.
  (global i32

I added a note here about that https://github.com/xtuc/js-webassembly-interpreter/blob/431caff0cb1debecd7c3b864103f78d3debc1ac6/src/interpreter/runtime/values/global.js#L19-L23. Might be worth opening an issue on the spec to clarify this?
The test you mentioned is only for parsing, since it's an 'instantiation-time initializer' it should still parse, right? My implementation of global initialization passes the spec tests tho.

raised an issue with the spec here: https://github.com/WebAssembly/spec/issues/694

Thanks!


remove symbol search

Towards #2634
Closes #2327
Closes #2362
Closes #2516

This was very useful, why was it removed ?

I'm interested to hear how much people complain

I'd also like to complain, so now there are 2 people who found this useful :D

I feel like people didn't know that this even exists, since it was not that much advertised and was not up for long. The problem now is even std symbols are not searchable anymore


[NewPlugin]  CleanTricks

Please add my plugin to the repository.
CleanTricks is a plugin to clean up some common obfuscation techniques (dirty tricks). There is an empty template included as well to be able to easily add your own, because there are many many obfuscations out there. However, often they get reused or slightly modified, and then it is useful to have a starting point/example. Pull requests are very welcome.
Author: Jan Beck
Repo name: https://github.com/janbbeck/CleanTricks
Release: 1.0

added, thanks!


UI redesign: popover menus

We should redesign all the popover menus along the lines of the new gear menu/personal menu/help menu design.

[x] The message actions menu
[x] The menus from the left sidebar views
[x] The stream actions menu
[x] Topic actions menu
[x] Mute/unmute/follow topic menu
[x] Send menu (#25117)
[x] Group card
[ ] User card (#27338)
[x] Anything I missed?

Note that redesigning typeaheads is tracked separately in #25116.
Notes:

We may have icon designs in Figma, but others will need to be designed. When planning to start on an issue, post in #design ahead of time, and @-mention @terpimost to request the icons that are needed.
The order in which we apply this design pass is not super important. We can start with the simplest menus first.
There may be some points that require a decision/design clarification (headings, etc.). Please start #design discussion as needed. If anything gets too complicated, we can split off additional issues.
"UI redesign: (whatever you're working on)" is generally a good topic to use for these discussions.

HI @alya , I will like to work on this.

Closing this as completed, since the only remaining item is the user card, tracked in https://github.com/zulip/zulip/issues/27338 and likely to finish soon as well.


bugtool: Default pprof to the agent's gops port

None of our binaries listen on 6060 anymore since we
switched the ports to avoid collisions. Bugtool will now
default to the agent's port, but inline other available
options.
❯ ./cilium-bugtool --help | grep pprof-port
      --pprof-port int            Pprof port to connect to. Known Cilium component ports are agent:9890, operator:9891, apiserver:9892 (default 9890)

Signed-off-by: Glib Smaga<EMAIL_ADDRESS>

LGTM. Any backwards compatibility issues with this?

Don't think so. Given that bugtool is deployed in the same container, it's unlikely to be used on older versions of cilium components. If anything, this is an improvement :)

the tests failing are legit.

the tests failing are legit.

😱 I wasn't expecting this to be covered, but I see it now. Will fix


Validation function enhanced

Hi,
i have several ideas i'm implementing in my plugin for value validation :

min/max validation
https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/Characteristic.js#L246
with the new validate function, if the value outbound the minValue or the maxValue, the value is limited to the min/max... but that min/max value is never validated and could be wrong... those may be parseInt or parseFloat too
-> maybe validate the min/max value on setProps ? or when assigning to the value ?
(eg : homebridge crash if maxValue="100" (a string) and the value is 300)

uint ... u is for unsigned
maybe a Math.abs() could be usefull to clean the value from any minus it could have.

bool
i transform any boolean like value into boolean with that function :

function toBool(val) {
	if (val == 'false' || val == '0') {
		return false;
	} else {
		return Boolean(val);
	}
}

could be nice here : https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/Characteristic.js#L219

float and int (and uint)
parseFloat and parseInt could be sure the value is a Float or an INT before sending

a way to avoid the null or undefined value to be sent
something like if(!val) val = default value

for reference, here is my sanitizing function, i use it before the commit with the validation on your side because i import data from a Jeedom plateform (and value may be diverse) (i know yours is better for certains points, but a merge of the two is even more validated ;))
// -- sanitizeValue
// -- Desc : limit the value to the min and max characteristic + round the float to the same precision than the minStep
// -- Params --
// -- currentValue : value to prepare
// -- characteristic : characteristic containing the props
// -- Return : prepared value
function sanitizeValue(currentValue,characteristic) {
	let val=0;
	switch(characteristic.props.format) {
			case "uint8" :
			case "uint16":
			case "uint32" :
			case "uint64" :
				val = parseInt(currentValue);
				val = Math.abs(val); // unsigned
				if(!val) val = 0;
				if(characteristic.props.minValue != null && characteristic.props.minValue != undefined && val < parseInt(characteristic.props.minValue)) val = parseInt(characteristic.props.minValue);
				if(characteristic.props.maxValue != null && characteristic.props.maxValue != undefined && val > parseInt(characteristic.props.maxValue)) val = parseInt(characteristic.props.maxValue);
			break;
			case "int" :
				val = parseInt(currentValue);
				if(!val) val = 0;
				if(characteristic.props.minValue != null && characteristic.props.minValue != undefined && val < parseInt(characteristic.props.minValue)) val = parseInt(characteristic.props.minValue);
				if(characteristic.props.maxValue != null && characteristic.props.maxValue != undefined && val > parseInt(characteristic.props.maxValue)) val = parseInt(characteristic.props.maxValue);
			break;
			case "float" :
				val = minStepRound(parseFloat(currentValue),characteristic);
				if(!val) val = 0.0;
				if(characteristic.props.minValue != null && characteristic.props.minValue != undefined && val < parseFloat(characteristic.props.minValue)) val = parseFloat(characteristic.props.minValue);
				if(characteristic.props.maxValue != null && characteristic.props.maxValue != undefined && val > parseFloat(characteristic.props.maxValue)) val = parseFloat(characteristic.props.maxValue);
			break;
			case "bool" :
				val = toBool(currentValue);
				if(!val) val = false;
			break;
			case "string" :
			case "tlv8" :
				val = currentValue.toString();
				if(!val) val = '';
			break;
	}
	return val;
}

// -- minStepRound
// -- Desc : round the value to the same precision than the minStep
// -- Params --
// -- val : value to round
// -- characteristic : characteristic containing the props
// -- Return : rounded value
function minStepRound(val,characteristic) {
	if(characteristic.props.minStep == null || characteristic.props.minStep == undefined) {
		characteristic.props.minStep = 1;
	}
	let prec = (characteristic.props.minStep.toString().split('.')[1] || []).length;
	if(val) {
		val = val * Math.pow(10, prec);
		val = Math.round(val); // round to the minStep precision
		val = val / Math.pow(10, prec);
	}
	return val;
}

// -- toBool
// -- Desc : transform to boolean a value
// -- Params --
// -- value : value to convert into boolean
// -- Return : boolean value
function toBool(val) {
	if (val == 'false' || val == '0') {
		return false;
	} else {
		return Boolean(val);
	}
}

thank you for reading

What about the indexed values for int and uint8? Or did I miss these checks in your examples?

BTW, thank you @NebzHB for pointing out the parseInt and parseFloat. I didn't think to do that since I was performing math on the value but it'll help prevent crashes.

@snowdd1 : no, as said in my comment, i did that sanitizing before the indexed value came out, and i didn't add it as the validation function do it right
@pdlove : it would be interesting to do that on min and max or on setprops too ... i did have a crash because the minValue was set to "0" for a INT.
For the CurrentAmbientLightLevel, my users had crashes because the captor get a 0 value, so the min value is set but it seems that 0.0001 is not get or rounded (even if there is no minStep value) and so it's set to 0 and it crash homebridge too (No Response)

@NebzHB The validate function does min/max validation. If you set the value less than the minimum, it stores the minimum and more than the maximum is set to the maximum. I've tried to make it impossible for a developer to freak out HomeKit on IOS by passing bad values. I know that it can't be that solid, but I think it's pretty close.
On the issue your users have had with CurrentAmbientLightLevel, is that with the current version? I may need to add a default minStep to floats of something like 0.00000001 to make sure that it DOESN'T try to round the value.

not really... it does validate the value against the min/max... but the min max are not validated themselves during setprops... as in my exemple, if the min max are set to a "0" string, and the value is -45 (int), the validation will set "0" into an INTEGER ... and homebridge crashes !


A sensible default setting for complex-valued optimisation

motivation
I have seen an emerging interest in optimizing complex variables: TF, Pytorch, Optax.
As Jax's convention, for some reasons#4891, the gradient on complex number given map f: ℂ→ℝ is in fact the conjugation of its steepest descent direction. It imposes some inconvenience in using basic jax.experimental.optimizer.sgd out of the box unless rewriting its enclosure for complex variables. In addition, a widely seen bother is that one needs to adapt a host of optimizers having second-order momentum(e.g., Adam) since the square of complex-valued grad does not stand for its variance which might translate into unexpected behaviors as demonstrated in the above referred discussions.
proposal
Replacing grad * grad with grad * grad.conj() is one of the agreed workarounds yet I can hardly find rigorous studies in the literature to support it. Despite the grad * grad.conj() seems working for sensible reasons, there are more real-value restricted operations(e.g., value comparison in amsgrad mode), which renders more incremental researches and optimizer-specific modifications. Given those concerns, it is handy to have a universal treatment that makes existing optimizers working as expected on complex variables out of the box from the caller's perspective while leaving no touch on the implementation of existing optimizers for conventional purposes.
As justified by @Lezcano in discussion,  one can treat a complex variable as 2 real variables, which solely doubles the number of parameters from the perspective of the optimizers. Though it may not be optimal since many practical complex objects's real and imag parts are connected by some rules, without knowing any domain-specific implications, the proposed extension should be a minimal superset of the current default for proper complex-valued optimizations.
example implementation
Thanks to Jax's nice PyTree utility, the implement is short and straightforward, here is my example

Thanks for the suggestion, and the clear explanation!
This line of thinking makes sense to me. I like how you factored out complex_handler. And I'm glad to hear that the extension turned out to be straightforward!
However, we're not really developing jax.experimental.optimizers more. From the jax.experimental README:

To serve that purpose, it is best to keep their code samples minimal; so we generally will not merge PRs adding new features. Instead, please send your lovely pull requests and design ideas to more fully-featured libraries like Haiku, Flax, or Trax.

Because these changes are somewhat exploratory, I'm inclined to keep jax.experimental.optimizers a bit simpler and more canonical by restricting to the real-valued setting. Even though that means one can't use jax.experimental.optimizers.sgd out-of-the-box, as you point out, it still wouldn't be hard for users to write a new optimizer specialized to complex-valued decision variables. After all, that's what the code in jax.experimental.optimizers is going for: bare-bones, but easy to fork and tweak to your purposes.
So for those reasons I'm inclined not to make this enhancement to jax.experimental.optimizers.
What do you think?

@mattjj Thanks for clarifying your purpose! Actually, I really like how jax.experimental.optimizers is composed in such an essential way that restrains from encompassing incremental enhancements, indeed, I'm benefiting much from this design to shape my own optimizer as you expect!
I suppose the proposed feature may serve as a bare-bones example to extend to complex domain with minimal efforts and assumptions on the basis of the impressive pytree utility(without which it would be not that straightforward afaik), which is exactly what jax.experimental.optimizers relies on to factor out the optimizer neatly and elegantly.
I'm also aware that the complex handler might be slightly confusing to regular users. But I have seen more ppl from other science disciplines getting into Jax's world, and I see the topic of complex diff has been well documented, isn't this extension the last minor step to cater to users dealing with complex values?
Since Jax is more general-purpose compared with its derivatives which haven't covered this topic well yet(they might tend to think this feature is too fundamental), one would likely trace back to Jax for some hints on how to optimize f: ℂ→ℝ instead of doing conjugation and other tweaks. Thus I think there is a meaningful tradeoff to justify this extension in Jax.
I'm looking forward to your suggestion!


Dev - added reward address getter and signData() method.

Added a getter to return the current array of reward addresses as an array of StackAddress objects.  Also, added a signData() method so the user can sign messages with their wallet.  The signData() method accepts the message as a string and internally converts it to the hex string required by the wallet's signData() method before calling that method.

@christianschmitz Sure.  Would you mind telling which branch (and tag if any) so I don't make the same mistake?  Also, any other changes necessary beyond just pulling from the latest code version?

The latest tag is v0.16.15

@christianschmitz Thanks, main or dev branch?

always main branch please

Creating new PR based on main instead of dev, so closing this one.


bugfix/community-member-cannot-invite-users-to-join-open-community

Community member can invite users to join an open community but she / he cannot invite herself / himself (as she / he is already a member of the community).

Codecov Report

Merging #53 into master will increase coverage by 0.05%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master      #53      +/-   ##
============================================
+ Coverage     73.71%   73.76%   +0.05%
- Complexity      401      405       +4
============================================
  Files           103      103
  Lines          1883     1887       +4
  Branches         56       57       +1
============================================
+ Hits           1388     1392       +4
  Misses          454      454
  Partials         41       41

Impacted Files
Coverage Δ
Complexity Δ

...nd/CommunityUserRegistrationCommandController.java
97.91% <100%> (+0.18%)
14 <1> (+4)
:arrow_up:

Continue to review full report at Codecov.

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

Codecov Report

Merging #53 into master will increase coverage by 0.05%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master      #53      +/-   ##
============================================
+ Coverage     73.71%   73.76%   +0.05%
- Complexity      401      405       +4
============================================
  Files           103      103
  Lines          1883     1887       +4
  Branches         56       57       +1
============================================
+ Hits           1388     1392       +4
  Misses          454      454
  Partials         41       41

Impacted Files
Coverage Δ
Complexity Δ

...nd/CommunityUserRegistrationCommandController.java
97.91% <100%> (+0.18%)
14 <1> (+4)
:arrow_up:

Continue to review full report at Codecov.

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


Anchor tag does not contain href property

The href attribute is inherited by the <a> tag via HTMLHyperlinkElementUtils as per
here. However for the life of me I can't find the href getter anywhere in the docs, nor any mention of HTMLHyperlinkElementUtils. href is of course the most useful property of <a>.

Thanks for the report! Looking into this I believe it's a duplicate of https://github.com/rustwasm/wasm-bindgen/issues/893, and HTMLHyperlinkElementUtils is indeed on that list.
We may be able to fix this issue specifically though by manually removing the attribute perhaps and/or switching it to a partial interface? The best fix though is to probably just fix the codegen for webidl to not fully ignore these tags!

Although web-sys now generates bindings for HTMLHyperlinkElementUtils, I still cannot figure out how to actually use them. Calling a.dyn_ref::<HTMLHyperlinkElementUtils>() on an HTMLAnchorElement fails, and the methods from HTMLHyperlinkElementUtils are not present on HTMLAnchorElement.
https://html.spec.whatwg.org/multipage/semantics.html#htmlhyperlinkelementutils (which
HTMLHyperlinkElementUtils.webidl links to as its origin) has interface mixin HTMLHyperlinkElementUtils. mixin is missing from the HTMLHyperlinkElementUtils.webidl in web-sys. I tried adding mixin and that seems to work: it adds a working set_href to HTMLAnchorElement.
Is this a problem with the .webidl file, or am I overlooking a different way of using HTMLHyperlinkElementUtils?

This is probably a case where we can just edit the webidl directly, especially if it's officially included upstream!
@marienz mind sending a PR?


Activity change

Hello,
When the user changes the activity so the activity is destroyed or something, the app would crash and the cause is calling show_dialog_you_are_not_updated() on an activity that is already closed. Can you please add the support to show a notification with update and cancel actions rather than a dialog?
Thanks

+1

If I correctly understand, that is due to the asynchronicity of the call to the dialog (it could be called in a later moment, too late for the activity which is already dead in your example)
Yes, I can add support to notification, sure. But do you think that could exist some trick to bypass this problem with the dialogs? Maybe a control on the activity variable?
Let me know.

The better approach is to show an actionable notification. But regarding the dialog, if you want to show a dialog not related to the passed activity, you take the passed activity application context (when passed) and hold a reference to it, and when you finish checking, you show an activity (with a dialog theme) using an intent started with the previously held application context.

Thanks


144 dev set return at async derivation pendingupdate

A very small change to the return data type of a method, no changes to the design of the DerivationClient nor AsynAgent. The IntegrationTest as in DerivationAsynExample has been tested locally, so I will just approve this myself.


Changing the logo .png file path in site.membership.less breaks Styles

I am trying to change this line in site.membership.less
.logo {
            margin: 0 auto 20px auto;
            width: 128px;
            height: 128px;
            background: transparent url(images/serenity-logo-w-128.png) no-repeat center center;
        }

when I change it to
.logo {
            margin: 0 auto 20px auto;
            width: 128px;
            height: 128px;
            background: transparent url(images/betz-logo-200.png) no-repeat center center;
        }

rebuild and run and it breaks the styles for main layout (after login), but login page works correctly. breaks as in no CSS loads, just HTML.
Then if I change it back to the default, the main layout style stays broken. So to fix the problem I have to do a GIT undo. I have repeated this process several times, with the same result.
I have not a clue what is causing it.

It might be file permission issue, check permissions.


[ENH] - Have conda store environments in user namespace not show up with username prefix

Feature description
conda env list results in something like the following

I'd prefer the env names in the user namespace not have a username prefix.
# conda environments:
#
new<EMAIL_ADDRESS>admin-climatology        /home/conda/admin/envs/admin-climatology
allm                    /home/conda/alewis<EMAIL_ADDRESS>dash                    /home/conda/alewis<EMAIL_ADDRESS>embeddings              /home/conda/alewis<EMAIL_ADDRESS>excelpy                 /home/conda/alewis<EMAIL_ADDRESS>falcon                  /home/conda/alewis<EMAIL_ADDRESS>lc                      /home/conda/alewis<EMAIL_ADDRESS>mem1                    /home/conda/alewis<EMAIL_ADDRESS>mem2                    /home/conda/alewis<EMAIL_ADDRESS>mem3                    /home/conda/alewis<EMAIL_ADDRESS>memory                  /home/conda/alewis<EMAIL_ADDRESS>panel                   /home/conda/alewis<EMAIL_ADDRESS>pmill                   /home/conda/alewis<EMAIL_ADDRESS>r                       /home/conda/alewis<EMAIL_ADDRESS>scratch                 /home/conda/alewis<EMAIL_ADDRESS>scratch2                /home/conda/alewis<EMAIL_ADDRESS>sec                     /home/conda/alewis<EMAIL_ADDRESS>test                    /home/conda/alewis<EMAIL_ADDRESS>trees                   /home/conda/alewis<EMAIL_ADDRESS>analyst-bio-data              /home/conda/analyst/envs/analyst-bio-data
analyst-dashboard-papermill    /home/conda/analyst/envs/analyst-dashboard-papermill

I could foresee a few issues.

If a user makes an env called analyst-myenv it would clash with a myenv environment name in the analyst namespace.

How to implement
I'm not sure how best to implement this.  It doesn't seem straight forward.  Maybe symlinks have a role here?
Value and/or benefit
Better UX for user environments
Anything else?
No response

This is currently a limitation of conda, since conda doesn't have namespaces and not including the username means that you can have name clashes with other peoples environments since all the environments are on a shared drive. This used to happen and whoever created the environment (say data-science) last would have precedence
There is probably a way to build a workaround. Maybe using the custom env-dirs based on the username. This might also require changes in conda-store. This probably intersects with how conda-store should name envs and namespaces for the standalone use case as well. cc: @soapy1

Oh ya, this seems like a conda-store issue to me. Feel free to drop an issue in conda-incubator/conda-store.


Docker Update For Ubuntu 20.04

Tell us about your request?
Docker official support for ubuntu 20.04
Which service(s) is this request for?
docker cli
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
there is no official support
Are you currently working around the issue?
no

Thank you. We are already working on this internally. The next patch release is expected to have packages for Ubuntu Focal Fossa.

Moved to correct status :)

Docker 19.03.9 is released, with packages for Ubuntu Focal Fossa.
Thanks for you patience. Enjoy!

Thanks
On Tue, 19 May, 2020, 12:43 PM Stefan Scherer<EMAIL_ADDRESS>wrote:

Docker 19.03.9 is released, with packages for Ubuntu Focal Fossa.
Thanks for you patience. Enjoy!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/docker/roadmap/issues/83#issuecomment-630630723, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AK2K5GWSSTVPKHD5DIZ7SQTRSIWQHANCNFSM4MXCXFBA
.

Closing as resolved now.


[vx.dev] implements #3

[vx.dev] This PR implements #3, created by vx.dev.

[vx.dev]: This code snippet creates a static website landing page for a travel connection service that offers hotel and ticket sales integration. The page features a gradient header with a navigation menu, main content with tabs to switch between hotel and ticket industries, and a footer with quick links. The design is visually appealing with 3D effects and images to showcase the services.


Add code fix for adding missing seq before {…}

Description

Add code fix for adding missing seq before {…}.

Checklist

[x] Test cases added.
[ ] Release notes entry updated.

Thank you :)


Getting OOPS src/heap.c 188 for peano factorial

The error should be reproducible as follows
$ git clone https://github.com/KNowledgeOnWebScale/retina

$ cd retina

$ tpl -g run retina.pl rdfsurfaces/peano/peano.s
*** OOPS src/heap.c 188
error(resource_error(memory),'$call'/1).

The original implementation of peano factorial was not tail recursive, but this one is.
It works fine with scryer as well as with eye/swipl.

You said Scryer was ok with this, but with the latest git build I get...
~/retina (master) $ scryer-prolog -g run retina.pl rdfsurfaces/peano/peano.s
thread 'main' has overflowed its stack
fatal runtime error: stack overflow
Aborted (core dumped)
~/retina (master) $
On Tue, Jul 11, 2023 at 12:59 AM Jos De Roo @.***>
wrote:

The error should be reproducible as follows
$ git clone https://github.com/KNowledgeOnWebScale/retina
$ cd retina
$ tpl -g run retina.pl rdfsurfaces/peano/peano.s
*** OOPS src/heap.c 188
error(resource_error(memory),'$call'/1).
—
Reply to this email directly, view it on GitHub
https://github.com/trealla-prolog/trealla/issues/253, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFNKSERXHA5JSCH62MDQYKTXPQKD5ANCNFSM6AAAAAA2EVO62Q
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Here it was and still is OK, that is meanwhile scryer also changed and our query surface also changed but it is still peano factorial 9.
So we do
scryer-prolog -g run retina.pl rdfsurfaces/peano/peano.s | tee rdfsurfaces/peano/peano-answer.s

and the result is at https://raw.githubusercontent.com/KNowledgeOnWebScale/retina/master/rdfsurfaces/peano/peano-answer.s

It is with
~/github.com/mthom/scryer-prolog$ git branch -a
* master

Ah.. now I see
$ scryer-prolog -g run retina.pl rdfsurfaces/peano/peano.s | tee rdfsurfaces/peano/peano-answer.s

thread 'main' has overflowed its stack
fatal runtime error: stack overflow

which is after restarting ubuntu.
The thing is that I was testing under the assumption of
$ ulimit -s 1000000

and I forgot about that :-(

And now i see.
On Tue, Jul 11, 2023 at 8:46 AM Jos De Roo @.***> wrote:

Ah.. now I see
$ scryer-prolog -g run retina.pl rdfsurfaces/peano/peano.s | tee rdfsurfaces/peano/peano-answer.s
thread 'main' has overflowed its stack
fatal runtime error: stack overflow
which is after restarting ubuntu.
The thing is that I was testing under the assumption of
$ ulimit -s 1000000
and I forgot about that :-(
—
Reply to this email directly, view it on GitHub
https://github.com/trealla-prolog/trealla/issues/253#issuecomment-1629830977,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFNKSEQT3F2VV37RAS2SO73XPSA43ANCNFSM6AAAAAA2EVO62Q
.
You are receiving this because you commented.Message ID:
@.***>

It works fine with
$ git diff
diff --git a/src/internal.h b/src/internal.h
index 63b496f..27e29a3 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -67,8 +67,7 @@ extern unsigned g_string_cnt, g_interned_cnt;
 #define MAX_QUEUES 255
 #define MAX_STREAMS 1024
 #define MAX_MODULES 1024
-//#define MAX_DEPTH 9999
-#define MAX_DEPTH 6000                 // Clang stack size needs this small
+#define MAX_DEPTH 1000000
 #define MAX_IGNORES 64000

 #define STREAM_BUFLEN 1024

I can remove the stack depth check, and then be at the mercy of rlimit -s #
settings. I tested it and your peano example works. But not sure if this is
the way to, I would like to avoid ungraceful terminations like this can
generate.
On Tue, Jul 11, 2023 at 8:46 AM Jos De Roo @.***> wrote:

Ah.. now I see
$ scryer-prolog -g run retina.pl rdfsurfaces/peano/peano.s | tee rdfsurfaces/peano/peano-answer.s
thread 'main' has overflowed its stack
fatal runtime error: stack overflow
which is after restarting ubuntu.
The thing is that I was testing under the assumption of
$ ulimit -s 1000000
and I forgot about that :-(
—
Reply to this email directly, view it on GitHub
https://github.com/trealla-prolog/trealla/issues/253#issuecomment-1629830977,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFNKSEQT3F2VV37RAS2SO73XPSA43ANCNFSM6AAAAAA2EVO62Q
.
You are receiving this because you commented.Message ID:
@.***>

I see

and I guess this is how swipl deals with it, no?

Ok, Trealla now checks the stack space and sets an appropriate stack depth
check.
On Tue, Jul 11, 2023 at 9:17 AM Jos De Roo @.***> wrote:

and I guess this is how swipl deals with it, no?
—
Reply to this email directly, view it on GitHub
https://github.com/trealla-prolog/trealla/issues/253#issuecomment-1629857615,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFNKSEVB75SK7G4U7HDLLJLXPSEQJANCNFSM6AAAAAA2EVO62Q
.
You are receiving this because you commented.Message ID:
@.***>

Now it runs fine ;-)

Thanks a lot!!


[BUG] DeleteRow

Hello !
DeleteRow function is not working when there are multiple matchs to delete.
current code is :
           for (let k = 0; k < matchedIndices.length; k++) {                 rows.splice(matchedIndices[k], 1);             }
matchedIndices = [0,1,2]
rows:  [ a, b, c ]

first splice delete a, rows => [b, c]
second splice delete c, rows = [b]
last splice delete nothing

maybe this should correct the code
           for (let k = matchedIndices.length; k >= 0; k--) {                 rows.splice(matchedIndices[k], 1);             }

Hello and good day!
Thank for your suggestion. However I cannot work on this right now. I would much appreciate it and you are very welcome to create a pull request regarding this matter.
Thank you!


leanpkg build fails with env: illegal option -- u on OS X

The OS X version of env doesn't have an -u (--unset) option. I'm not sure if having LEAN_PATH set to the empty string would suffice: if so it seems calling env LEAN_PATH= lean --make would work everywhere.
In any case, I don't know why we need to clear the LEAN_PATH environment variable, so I'm not sure of the appropriate fix.

The reason why we clear the LEAN_PATH environment variable is because it would override the paths obtained from leanpkg.path.  (We set the LEAN_PATH environment variable in the leanpkg script so that Lean find the leanpkg files.)  In leanpkg build, we want to call lean --make with the path of the current package, not with the LEAN_PATH we inherit from leanpkg.
The plan here is to add io.env.getenv, io.env.setenv, and io.env.unsetenv calls, then we can do the environment inside leanpkg.

if so it seems calling env LEAN_PATH= lean --make would work everywhere.

Unfortunately not.  An empty environment variable is still set, in this case Lean would then use the empty search path (that is, absolute import statements would not work at all):
[gebner:~/smt2_interface] master ± env LEAN_PATH= lean -p
{
  "is_user_leanpkg_path": false,
  "leanpkg_path_file": "/home/gebner/smt2_interface/leanpkg.path",
  "path": []
}
[gebner:~/smt2_interface] master ± env -u LEAN_PATH lean -p
{
  "is_user_leanpkg_path": false,
  "leanpkg_path_file": "/home/gebner/smt2_interface/leanpkg.path",
  "path": [
    "/home/gebner/lean/bin/../library",
    "/home/gebner/lean/bin/../lib/lean/library",
    "/home/gebner/smt2_interface/./."
  ]
}

Interestingly, I just discovered the OSX 10.12's version of env supports the -u option, so leanpkg works fine there.

This should be fixed since 1b8533130b79fdb28e0210c11778aaa0f7eacee8.  Please reopen if the problem is still there.


[Improve] correct the wrong word.

Purpose of this pull request
just correct the wrong word.
Check list

[x] Code changed are covered with tests, or it does not need tests for reason:
[ ] If any new Jar binary package adding in your PR, please add License Notice according
New License Guide
[ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs

Great!Thank you for your contribution.


merge_asof functionality

Would it be possible to add some functionality to xarray merge that mimics pandas merge_asof ? This would be very useful when aligning timeseries dataarrays where the two arrays are misaligned.
Thanks.

I think this would be good. It would need to be implemented outside of python (cython / numba / etc) given the performance requirements. I'm not sure whether we could borrow the pandas functionality and apply it to multi-dimensional arrays.
Assuming we'd need to write our own, xarray doesn't have any cython dependencies, so I think it would be best in a separate and optional package. These could go in numbagg.
It's non-trivial work, so someone would have to have a strong need for it.

How is merge_asof different from using reindex with method='pad'?

Reindexing can cause a massive and unnecessary inflation in the size of a
dataset.
Assume for example we have two datasets sampled daily going over multiple
years - except that the time of day at which they are sampled is different
and varying day to day.
Trying to line these up with reindex + forward fill would require
upsampling the right dataframe to the least common multiple of their
sampling periods which in the limit could be nanoseconds.
On Wed, Aug 14, 2019, 15:34 Stephan Hoyer<EMAIL_ADDRESS>wrote:

How is merge_asof different from using reindex with method='pad'?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/pydata/xarray/issues/3218?email_source=notifications&email_token=AAHBOLWL6GXQLF7TDY6JJR3QERM4JA5CNFSM4ILW6VK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4J3YWA#issuecomment-521387096,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHBOLS2K7BM3SMGYPWHLZTQERM4JANCNFSM4ILW6VKQ
.

As of now, a simple workaround would be to do these tasks in pandas and
switch back and forth.
A couple of years ago - before pandas had pd.merge_asof - I had implemented
a version of this logic in numba when working with numpy arrays.
It was blazingly fast - and if there is interest I can try to dig it up ? I
would need some help  making it work for xarrays and publishing it into the
master branch.
On Wed, Aug 14, 2019, 14:12 Maximilian Roos<EMAIL_ADDRESS>wrote:

I think this would be good. It would need to be implemented outside of
python (cython / numba / etc) given the performance requirements. I'm not
sure whether we could borrow the pandas functionality and apply it to
multi-dimensional arrays.
Assuming we'd need to write our own, xarray doesn't have any cython
dependencies, so I think it would be best in a separate and optional
package. These could go in numbagg.
It's non-trivial work, so someone would have to have a strong need for it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/pydata/xarray/issues/3218?email_source=notifications&email_token=AAHBOLSMYMJ5GK3LJLPURBTQERDKFA5CNFSM4ILW6VK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4JURTY#issuecomment-521357519,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHBOLVZ6VEZTAZV4MFOMBLQERDKFANCNFSM4ILW6VKQ
.

How is merge_asof different from using reindex with method='pad'?

Yes this is right! Mea culpa. We can already use the pandas reindexing for the 1D case (which should cover your case @fjanoos ?)
@fjanoos can you confirm this is what you're looking for?

In [4]: da=xr.DataArray(list('abcdefghil'), dims=['x'],coords=dict(x=range(10)))

In [8]: da.reindex(x=[0,2.5,2.6,2.7,5,6.2], method='nearest')
Out[8]:
<xarray.DataArray (x: 6)>
array(['a', 'd', 'd', 'd', 'f', 'g'], dtype='<U1')
Coordinates:
  * x        (x) float64 0.0 2.5 2.6 2.7 5.0 6.2

That looks correct. Let me try and revert back to you
On Wed, Aug 14, 2019, 16:44 Maximilian Roos<EMAIL_ADDRESS>wrote:

How is merge_asof different from using reindex with method='pad'?
Yes this is right! Mea culpa. We can already use the pandas reindexing for
the 1D case (which should cover your case @fjanoos
https://github.com/fjanoos ?)
@fjanoos https://github.com/fjanoos can you confirm this is what you're
looking for?
In [4]: da=xr.DataArray(list('abcdefghil'), dims=['x'],coords=dict(x=range(10)))
In [8]: da.reindex(x=[0,2.5,2.6,2.7,5,6.2], method='nearest')
Out[8]:<xarray.DataArray (x: 6)>
array(['a', 'd', 'd', 'd', 'f', 'g'], dtype='<U1')
Coordinates:

x        (x) float64 0.0 2.5 2.6 2.7 5.0 6.2

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/pydata/xarray/issues/3218?email_source=notifications&email_token=AAHBOLQHOB6IQKA4ZU2EHF3QERVBHA5CNFSM4ILW6VK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4KBVHA#issuecomment-521411228,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHBOLQM7PRFBOFQMPSNZL3QERVBHANCNFSM4ILW6VKQ
.


"Keep Originals" checkbox in Overlay Channels command does not trigger

Hi @karlduderstadt,
I just noticed a minor flaw in the Overlay Channels command. The "keep originals" checkbox doesn't seem to trigger for me. Regardless of the selection, the original images always stay open.
Do you also encounter this problem?

Update: It seems like the original is actually only still kept open in Fiji GUI (the window itself). However, when trying to perform actions on the original it throws errors that the original does not exist. I hope this helps

Thanks for the update about this issue. It is a bit of a puzzle for me. An imagej command actually does the overlay and takes the boolean to set / unset keep originals. In line 205 of OverlayChannelsCommand:
imgOut = ij.plugin.RGBStackMerge.mergeChannels(images, keep);

So I wonder why this is not working. Perhaps I don't understand the use. I believe the keep variable is set correctly, but I will check. I will investigate further and get back to you.

Ahhh I guess the images in the above line are generated and never displayed directly so we could just set keep to false. Always.
Do you need it to close the other images automatically. I think in this case, we would then need to add some lines that close them OR we could remove the checkbox :)
What do you think would be best?

Exactly, I figured it is simply using imagej's mergeChannels command so I don't understand the different behavior in OverlayChannelsCommand.
I'm not sure whether keeping or closing the original images is the preferred setting but I think removing the checkbox is a good idea.

Ok I removed the checkbox option, so I guess this "fixes" the problem.
In the process of implementing this fix, I noticed that if SCIFIO is turned on duplicate image entries show up in the ChoiceBoxes. I wrote a version that fixes this and works well with SCIFIO, but then I found this version is broken with SCIFIO turned off, which is the current way to work with mars...
So this is a bit of a puzzle. The migration to OME will probably require the SCIFIO version, so I guess when we make that switch I will also change to the SCIFIO compatible version and at that point there will be no going back.
Can you at least confirm this is working for now?

The latest commit implements a work around that simply closes the individual images if the keep option is false. @mjosch - does this address the issue?

I tested the newest version and images are properly closed now when keep is set to false. Also, it behaves as expected if the originals are kept. So I don't see any more issues with the command, I'll close the issue
Thanks a lot @karlduderstadt, I'm glad we could fix it!


Kernel compilation hangs with a particular dtype

Here's the pallas kernel from the repo that I've slightly modified by introducing control over accumulator dtype:
def mha_forward_kernel(
    q_ref,
    k_ref,
    v_ref,
    o_ref,
    *residual_refs,
    dot_product_scale: float,
    block_q: int,
    block_d: int,
    block_kv: int
):
    dtype = jnp.float32  # HANGS IF I REPLACE THIS WITH BFLOAT16 !!!

    seq_len = q_ref.shape[0]
    start_q = pl.program_id(0)

    neg_inf = -1e20

    # acc is the buffer where we accumulate the output on sram.
    # m_i and l_i (see FlashAttention paper) are updated during the k,v loop.
    m_i = jnp.full(block_q, dtype=dtype, fill_value=neg_inf)
    l_i = jnp.zeros(block_q, dtype=dtype)
    # acc is the buffer where we accumulate the output on sram.
    acc = jnp.zeros((block_q, block_d), dtype=dtype)

    # Load q: it will stay in L1 throughout. Indices form a matrix because we
    # read, compute, and write all in 2d chunks. 1 element ~= 1 CUDA thread index.
    # q tile has shape [block_q, block_d], block_d == head_dim.
    q = pl.load(q_ref, (pl.dslice(start_q * block_q, block_q), pl.dslice(None)))

    # In FlashAttention algorithm 1 there are 2 loops: slow over tiles of kv (size
    # (Bc == block_k here), and fast over blocks of q (size Br == block_q here).
    # Here we only loop over blocks of kv to process entire seq_len, the loop over
    # blocks of q is carried out by the grid.
    def body(start_k, carry):
        acc, m_prev, l_prev = carry

        k = pl.load(k_ref, (pl.dslice(start_k * block_kv, block_kv), slice(None)))

        qk = jnp.zeros([block_q, block_kv], dtype=dtype)
        qk += pl.dot(q, k.T)  # [block_q, block_k]
        qk *= dot_product_scale  # [block_q, block_k]

        m_curr = jnp.maximum(jnp.max(qk, axis=1), m_prev)
        l_prev *= jnp.exp(m_prev - m_curr)
        p = jnp.exp(qk - m_curr[:, None])
        l_curr = jnp.sum(p, axis=1) + l_prev

        l_rcp = jnp.ones((), dtype=dtype) / l_curr
        p = p * l_rcp[:, None]
        acc *= (l_prev * l_rcp)[:, None]

        v = pl.load(
            v_ref, (pl.dslice(start_k * block_kv, block_kv), pl.dslice(block_d))
        )
        acc = acc + pl.dot(p.astype(v.dtype), v)
        return acc.astype(dtype), m_curr.astype(dtype), l_curr.astype(dtype)

    upper_bound = jt.cdiv(seq_len, block_kv)
    acc, m_i, l_i = jax.lax.fori_loop(0, upper_bound, body, (acc, m_i, l_i))

    if residual_refs:
        l_ref, m_ref = residual_refs
        pl.store(l_ref, (pl.ds(start_q * block_q, block_q),), l_i)
        pl.store(m_ref, (pl.ds(start_q * block_q, block_q),), m_i)

    # Write output to dram.
    acc = acc.astype(o_ref.dtype)
    pl.store(o_ref, (pl.dslice(start_q * block_q, block_q), pl.dslice(None)), acc)

Suprisingly, the compilation of this kernel hangs (!) if I set the dtype to be bfloat16. I suspect there's a bug somewhere.

Thanks for the heads-up. This is likely a Triton compiler bug but I will try to repro and investigate this week.


refactor: of now works with Applicatives

This change addresses the issue of of not being able to
work with Applicatives.
Fixes #3267
BREAKING CHANGE: of is now a binary function with a constructor as its first argument.
Acknowledgement
This PR is almost an 100% copy/paste of #2687.
Notable differences:

Fix parameter name in JSDoc annotations
Update description
Update example
Ignore one set of changes in tests as other changes were committed since then

@CrossEye Any objection to merging this now? We could create a draft v1 release notes now if you fear we would miss out on important breaking changes such as this one.

Merged.  We usually hope that two active maintainers (besides the author, when appropriate) will approve, and then anyone can merge.


License lookup for npm

Similar to how we fetch licenses for go packages we have request from clients to include licenses for npm packages as well. Perhaps, this should be an opt-in flag since there will be far too many npm packages.
We can also think about a breaking change for go to only fetch licenses with the presence of a flag. Currently, license lookup is performed by default for go and an environment variable SKIP_FETCH_LICENSE is used to disable this lookup.

Implemented with 2.2.9


Notifications - Not restricted to linked devices

Notifications sent to users from all devices, not only from devices linked to the user account.
To Reproduce
Steps to reproduce the behavior:

Create "Geofence Enter" or "Ignition On" notification and set channel to mail
Link Notification to specific user. Use a user with a small amount of devices linked to his account.

The user receive the notifications from devices that are not linked to his account.

Can you please provide a specific example how to reproduce it from scratch. I've tried before and wasn't able to.

Maybe I misunderstand something, but your steps to reproduce sounds like what's expected. If you link a group to a user, he should receive notifications from that group.
Can you please describe very specific example. Let's say we have:

user 1
user 2
group 1
group 2
device 1
device 2
notification

What is linked to want?

Just tested the exact scenario and still not able to reproduce. Are you sure you tried this with a clean server? Or you're just guessing?
Also very suspicion that it started after changing the web app. Web app has nothing to do with notifications. They are sent directly from the backend, especially emails.
Please test and make sure to test and provide details about user permissions, like admin non admin etc.

Another option if you can send me your database dump and tell what users have this problem, this should help.

To reproduce in my environment:
Users affected: 2, 3, 4, 5 (real userid in my database)
Device that raised the issue: 3
Geofence that raised the issue: 16
User-Device relationships:
2	3
3	4
5	6
6	8
4	9
Notifications:
1	geofenceExit	{}	0		mail
3	deviceOnline	{}	0		mail,web
4	ignitionOn	{}	0		mail
5	deviceMoving	{}	0		mail
6	alarm	{"alarms":"powerCut,vibration"}	0		mail
8	deviceOnline	{}	0
User notifications relationship:
2	1
3	1
3	3
4	3
4	1
2	4
2	5
2	6
5	3
5	1
2	8
Device notifications relationship:
3	1
4	1
3	3
3	4
3	5
3	6
6	3
6	1
User geofence relationship:
3	1
3	4
5	9
5	10
5	11
5	13
2	6
2	12
5	14
2	15
2	16
2	17
2	19
4	20
4	1
Device geofence relationship:
3	1
4	4
4	1
3	6
6	9
6	10
3	12
6	13
6	14
3	15
3	16
3	17
9	1
9	20
3	19
Then, when device 3 exited geofence 16, user 2,3,4,5 where notified when until now, only user 2 was the one receiving it as it is the only one linked to the device.
Hope this help and thank you very much.

Is it possible to provide a database dump for that setup?

You can send it to me over email. Address in the profile. Obviously I won't share any private info. You can also probably clean up some unrelated stuff before sending.

Done, Anton, thank you very much. Hope it helps!
Don't hesitate to count on me if you need anything else.

I think I'm starting to understand the problem. It happens when you reuse same notification object for different users that have completely different devices.
@joystickjockey can you confirm if you have similar setup when you reuse notifications between users?

Absolutely, it is my case, the thing I understood as "notification definition" that later is configured/associated with users and devices, it is the same one for everything. But the way it worked until 5.1 was it took into account device-user relationship. 🤷

I think it's finally fixed https://github.com/traccar/traccar/commit/3f46f759c24746ddd2b8cd05cfc6cb99d5f7fd48. Please test if possible.

Tell me how (I'm running it as a Docker) and I will be more then glad! Thank you!

I don't have a docker image, but you can get latest files from here:
https://traccar.nyc3.digitaloceanspaces.com/builds/traccar-linux-arm-preview.zip
You really just need the JAR file.

Thank you very much, I will try it shortly and come back with feedback.
In any case, do you plan to distribute it as 5.1.1, maybe?
Thanks again.

Hello,
I'm on raspberry and have the same issue. I just changed the jar file but also need to add new changelog on schema folder.
But now, i'm getting the following WARN and don't know where to check:
2022-07-13 20:52:47  WARN: Set property error - NullPointerException (Device:59 < ... < QueryBuilder:363 < *:449 < DatabaseStorage:71 < ...)
2022-07-13 21:07:47  WARN: Set property error - NullPointerException (Device:59 < ... < QueryBuilder:363 < *:449 < DatabaseStorage:71 < ...)
2022-07-13 21:22:47  WARN: Set property error - NullPointerException (Device:59 < ... < QueryBuilder:363 < *:449 < DatabaseStorage:71 < ...)
2022-07-13 21:37:47  WARN: Set property error - NullPointerException (Device:59 < ... < QueryBuilder:363 < *:449 < DatabaseStorage:71 < ...)

Thanks in advance!!!

Please create a separate ticket.

The NullPointerException issue should be fixed now.

HI Anton, the notification issue seems not to be fixed in 5.2
I had earlier raised this issue but i seem to be able to reproduce it now.
To reproduce:
1: from admin account create 2 user account(User A & User B)
2: From admin account create 4 vehicles,  A,B,C,D
3: Assign Vehicle A to user A and Vehicle B to user B
4: From admin account create Notification (Igniton On, Traccar/mail, check All device)
5: Sign into User A account and create notification as (Igniton On, Traccar/mail, check All device) Or assign notification from admin account to the user.
6: Turn on Ignition for Vehicle C and watch user A and B receive same notification despite not having the vehicle on their list.


Get a test site up and running

Note: https://github.com/actions/deploy-pages/issues/73
Resolves: #5

It's now up  https://next.opendataphilly.org/!  I forgot with the new setup if you want to be able to deploy from other branches you need to enable that in Environments.
Assuming the review looks good, ideally just rebasing your data one against this will deploy it to the site.

Added branch names to #7 - that's where we really should make a decision for this.


Make Diffy archive ready

Making Diffy project ready to archive as per Twitter's standard process.
@agargenta Please review

 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.


Exporter rapport

Describe the bug
A clear and concise description of what the bug is.
Browser

[ ] chrome

version:
rosettastone product

[ ] Fluency builder

To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
Hi I can't export the rapport!!

same problem


compilation error: Fixing libtool for -rpath problems.

I'm trying to compile binary into ubuntu 16.04, here are last few lines ending up with error. Tried many work around but to no avail. Could anyone tell me what I'm missing?

configure: WARNING: jni headers/dependencies not found. jni support disabled
checking whether byte ordering is bigendian... no
configure: Using static precomputation: yes
configure: Using assembly optimizations: x86_64
configure: Using field implementation: 64bit
configure: Using bignum implementation: no
configure: Using scalar implementation: 64bit
configure: Using endomorphism optimizations: no
configure: Building ECDH module: no
configure: Building ECDSA pubkey recovery module: yes
configure: Using jni: no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libsecp256k1.pc
config.status: creating src/libsecp256k1-config.h
config.status: src/libsecp256k1-config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
Fixing libtool for -rpath problems.

That's not a problem. What happens when you run make afterwards?

Make didn't work as it end up like that.
However, now I'm trying  ./configure --disable-rpath;make and it seems to go smooth with Make.

Make, ressult in this error.........

/usr/bin/ld: crypto/libbitcoin_crypto.a(crypto_libbitcoin_crypto_a-neoscrypt.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
crypto/libbitcoin_crypto.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:3439: recipe for target 'guncoind' failed
make[2]: *** [guncoind] Error 1
make[2]: Leaving directory '/root/guncoin/src'
Makefile:8708: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/guncoin/src'
Makefile:689: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Add this to configure...
./configure --disable-shared --enable-static --enable-asm
make clean
make


Module 1.1 Assignment

Given what you have learned about Git, why would you want to use Git in your classroom?

Yes!


Duplicate presence of slot error when using children through a scoped slot.

Version
2.5.17
Reproduction link
https://jsfiddle.net/jsotron5000/eywraw8t/464522/
Steps to reproduce
Run the JSFiddle and open up dev tools.
You will see the Vue warning about duplicate default slots even though there is only one slot in the template.
What is expected?
No warning when using child components slotted into a renderless component.
What is actually happening?
A warning is displayed saying there are duplicate default slots when there is only one.

Here is another JSFiddle with a use case where this bug would occur:
https://jsfiddle.net/jsotron5000/eywraw8t/464242/
It is a renderless tabs component that works with another component (TabItem) which can be passed in through a slot.
The TabContainer component looks at the TabItem components and relays them to the parent component through a scoped slot.
The warning only displays when doing anything with the child vnodes inside the render function.
If you replace the children prop in the JSFiddle with just a hard coded array there is no warning.

Duplicate of #8546


Exergy, anergy and entropy

Description of the issue
In some definitions, we have phrases like "useful" or "usable" energy/heat. The more stringent term here would probably be exergy. If there is usable energy, then there is also unusable energy, this is often called anergy. Related and probably needed to define anergy and exergy is entropy.
See also: https://en.wikipedia.org/wiki/Exergy
Ideas of solution
If you already have ideas for the solution describe them here
Workflow checklist

[ ] I discussed the issue with someone else than me before working on a solution
[ ] I already read the latest version of the workflow for this repository
[ ] The goal of this ontology is clear to me

I am aware that

[ ] every entry in the ontology should have a definition
[ ] classes should arise from concepts rather than from words

Some definitions and explanations from other sources as start of discussion:
exergy:

Exergy is defined as the potential work that can be extracted from a system by reversible processes as the system equilibrates with its surroundings. (Source: Ayres (1998): Eco-thermodynamics: economics and the second law)
In thermodynamics, the exergy of a system is the maximum useful work possible during a process that brings the system into equilibrium with a heat reservoir, reaching maximum entropy. (Source: Wikipedia)
The maximum fraction of an energy form which (in a reversible process) can be transformed into work is called exergy. (Source: Hohnerkamp (2002): Statistical physics)

anergy:

Als Anergie wird der Bestandteil einer Energie bezeichnet, der in einem Prozess keine Arbeit verrichten kann. (Anergy is the component of energy that cannot do any work in a process. Source: Wikipedia-de)
[E]xergy is always destroyed when a process is irreversible, for example loss of heat to the environment [...]. This destruction is proportional to the entropy increase of the system together with its surroundings (see Entropy production). The destroyed exergy has been called anergy. (Source: Wikipedia)
... The remaining part is called anergy, and this corresponds to the waste heat. (Source: Hohnerkamp (2002): Statistical physics)

Btw, we also already have a class waste thermal energy (alt. waste heat): Waste thermal energy is thermal energy that is the physical output of an energy transformation process and that is released into the environment unused. This might be equivalent or is at least related to anergy.


initial implementation

what

initial implementation
creates AWS budgets from var.budgets
optionally creates an SNS topic and Lambda setup for Slack notifications if var.notifications_enabled is true
optionally creates an KMS key if var.encryption_enabled is true (the default key will not work since budgets.amazonaws.com needs permissions to the key)

why

an AWS native way to set custom budget alerts

notes

the only places where KMS is not used is for the CloudWatch log group. The underlying module that handles slack notifications does not expose the interface to set those.
if notifications_enabled is true, the module will try to create an SNS topic with a Lambda setup for Slack notifications
if notifications_enabled is true and encryption_enabled is true then a KMS key will be created with a specific policy to allow budgets.amazonaws.com to use the key
I've commented out the TestExamplesCompleteDisabled test since it was trying to apply an empty plan instead of displaying No changes. After the tests ran, you can manually run terraform apply and the proper output would be show.

/test all

/test all


[ScriptManager] Failed while resolving script locator

Ask your Question
I clone the source and run yarn run:host:android --> show error
[ScriptManager] Failed while resolving script locator: {"caller": undefined, "scriptId": "auth"} {"originalError": [TypeError: Network request failed]}

Please help me!
Thanks

Closing this one as this is related to the super-app-showcase and is a duplicate of https://github.com/callstack/super-app-showcase/issues/53


How to load storyboard localization after change language

Thanks for source code.
But, I do not reload screen after change language. I using storyboard localization.
Please help me fix it.

Hello Lecong,
sorry, I have done this to support the localization string file, not storyboards.
But can you share more details about the issue?
Thank you.

Hi lecong,
Now I added support for the storyboard localization.
Thank you !!

How to use it?
I reload root view controller it not working
UIApplication.topViewController!.dismiss(animated: true) {             let delegate = UIApplication.shared.delegate as! AppDelegate             let storyboard = UIStoryboard(name: "Main", bundle: nil)             delegate.window?.rootViewController = storyboard.instantiateInitialViewController() }


Update client_resource.graph.colouring to be Int64 for computation_round colouring

MBQCColouringSet(computation_round = [1.0,1.0,1.0,1.0]...

Change to
MBQCColouringSet(computation_round = [1,1,1,1]...

This should be use defined, close comment.


Update Directory.php

In the delete method of this Directory class, I noticed it uses Laravel Collections, which isn't what Illuminate FileSystemAdapter expects.
If you take a look at the below URL from Illuminate:
https://github.com/laravel/framework/blob/5.6/src/Illuminate/Filesystem/FilesystemAdapter.php#L292
Notice it either takes a string or an array. If you pass in a collection, it'll evaluate "is_array($paths)" to false.
Thus, the delete would always throw a file not found exception due to incorrect handling.
I've made minor changes so the collection is converted to an array of paths, using the all() method of collections.

Thanks that's very remarkable indeed. Not sure where this snug in. The Directory class is a huge hack anyway, I wouldn't be too surprised to be dropped completely somewhere in the future of this package ;)


Don't forget to mention build-dependancies

On a clean server, given the old instructions the pecl command will fail due to at least missing php7.0-dev (for phpize) and g++ (for cpp).

Coverage remained the same at 35.261% when pulling eb009e70988aa9f1d0507d16fedef0e8548115d2 on pmjdebruijn:PHP-7.0-Linux into c2e77a7c77b672c307777fb3b810c9c6ac74ca52 on Microsoft:PHP-7.0-Linux.

Thank you @pmjdebruijn for the pull request. Please note that php7.0-dev is already listed among the required packages in the apt-get command in step 1. We will add g++ to the list, though it should install gcc as a dependency.
Could you tell us why re2c is necessary?

The ./configure script (after phpize) warns about it being missing if it's not installed (IIRC), also the Dockerfile installs it as well.

both sqlsrv and pdo_sqlsrv check for re2c presence:
checking for re2c... re2c
checking for re2c version... 0.16 (ok)

Thank you. We haven't had any problems in our testing even though re2c is not available. Do you experience any specific problems because re2c is missing?

Hi @pmjdebruijn. I'm going to close this. The readme is updated with g++ and re2c for Ubuntu and Red Hat.


worker should support two different run modi: sidechain & indirect only

As of now, the worker accepts all incoming rpc calls and produces blocks based on a time interval (https://github.com/scs/substraTEE-worker/blob/master/worker/src/main.rs#L393)
In the future, it should be possible to differentiat between two modi:

indirect-only: chain syncing will happen on a event based schedule (new finalized onchain block -> sync chain). direct operations will still be accepted, but trusted calls from the top pool will not be executed and and error message will be issued. Trusted getters will be executed.
sidechain: as it is now implemented.

Suggestion: Implement two different functions in worker main and depending which modus is run, call produce_block (sidechain modus) or call sync_chain (indirect only). Enclave will be called accordingly.

@clangenb FYI

This issue is still valid, however the modi are outdated or we need a third modi to cover use cases such as polkadex and ternoa:
3. Direct as well as indirect calls are acceped but with an event based chain syncing, not time interval based.

According to @clangenb , we would need different states for each mode. We could separate those by putting the state into separate folders.
This would make it linked to #218, where we want to purge the state.

I'm in favor of renaming / splitting up this issue, as it's original intent changed. The sidechain will be optional, but this is tackled in issue https://github.com/integritee-network/worker/issues/301.
What we need to think about, are the following things:
a) block production / chain relay syncing / enclave entering (what should this be called?) : interval or event based
b) Accepting indirect and/or direct calls
Questions:

Are a) or b) connected to the sidechain block production? or should they be handled completely independent?
Are a) and b) interconnected in any way?

And depending on these answers how should we split these optional things such that is makes sense, especially the naming part.

We (@mullefel , @haerdib , @clangenb ) have had a lengthy meeting now to discuss this issue and break it down into the features we need and corresponding tasks to get there.
Features / Flags
SideChain

Enabled (also enable Top Tool for RPC direct calls)
Disabled (RPC direct calls are executed immediately, which has to be implemented specifically for each use-case)

Indirect Calls

Immediate execution (what we have now)
Buffer execution (requires new implementation, new Buffer trait, and Top Pool implements that trait)
Disabled

(Direct) Top Pool

Execute both trusted getters & trusted calls
Execute only trusted getters

Tasks

Top pool must be able to differentiate between trusted call and trusted getter
Parameterize Top pool such that trusted calls can be disabled (and only trusted getters are executed)
Move Top pool to its own crate (see #301)
Allow side chain, and with it the Top pool, to be optional
Separate parent chain syncing and execution of indirect calls (-> #404)
Allow indirect calls to be added to a buffer (instead of only immediate execution), Top pool implements this buffer trait
New option to disable indirect-calls execution (low priority -> icebox)

I'm only missing one thing in the task list: We have listed to "disable indirect call execution" but not the option of switchting between immediate and buffered execution of indirect calls. Should this be added to the task description of #418?

Would it make things easier if all these options would be selected with compiler flags instead of cli options? Actually, I realize that there will probably never be an implementation which needs to change the mode for the same binary

I'm only missing one thing in the task list: While we have listed "disable indirect call execution" there's no mention of the option of switchting between immediate and buffered execution of indirect calls. Should this be added to the task description of #418?

It was implied in the description, but I've now updated the description to explicitly mention it 👍

Would it make things easier if all these options would be selected with compiler flags instead of cli options? Actually, I realize that there will probably never be an implementation which needs to change the mode for the same binary

We briefly touched on this as well, and we also came to the conclusion that a compiler switch / feature would probably make most sense.

I have also thought about this some more. I think compiler flags are ok, but they also introduce complexity. I have talked with @haerdib once. She meant that every customer had to touch the enclave-runtime's main file heavily anyhow. So I would actually prefer to create generic code in contrast to flags, i.e., introduce traits like:

OnDirectRequest
OnIndirectRequest

We would only introduce flags for enabling/disabling a feature completely because it removes some dependencies and some threads are not started at all. What do you think about that?

I think more generic code, i.e traits that make it easy to switch out code, would be great anyway. What I'm not sure about is if the "in contrast" is necessary. Because there might be some clients that will be acutally using the STF (as it has been originally intended) and don't need to tamper with the enclave-runtime. Additionally, we might want to differ between:

Indirect Calls Execution handling: I agree, compiler flags might overcomplicate the code, traits may be easier
Top pool accepting Direct Trusted calls: I just can't imagine anyone wanting to switch out anything there - if a different buffer is necessary, it's easier to switch out the whole buffer. Also, even though direct trusted calls might want to be turned off, indirect trusted calls should still be bufferable, so working with a compiler flag might be easier here.

@clangenb do you by any chance now how substrate does it with the future pool? Because it can be turned off without changing the code. We might want to do the same for our top pool.

I think this issue can be closed now as we have the modi: sidechain and offchain-worker.