There is an error in the type defined in the ServiceAccount

Describe your environment

Operating System version:  window 11
Firebase SDK version: firebase-admin 13.0.0
Firebase Product: credential, auth
Node.js version: 20.12.0
NPM version: 10,5.0

[REQUIRED] Step 3: Describe the problem
I followed the example provided for the admin.credential.cert() function, but encountered an issue.
I'm trying to initialize the app with admin.initializeApp() using Firebase Admin SDK version 13. However, there seems to be a discrepancy between the type defined in ServiceAccount and the key values actually used for authentication.
Steps to reproduce:
The following code causes the following error.

The incoming JSON object does not contain a private_key field
The incoming JSON object does not contain a client_email field

as-is
import admin, { ServiceAccount } from "firebase-admin";

const serviceAccount: ServiceAccount = {
  projectId: process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID,
  privateKey: process.env.FIREBASE_PRIVATE_KEY?.replace(/\\n/g, "\n"),
  clientEmail: process.env.FIREBASE_CLIENT_EMAIL,
};

if (!admin.apps.length) {
  admin.initializeApp({
    credential: admin.credential.cert(serviceAccount),
    databaseURL: `https://${process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID}.firebaseio.com`,
  });
}

export default admin;

So, after modifying the code as follows, it worked correctly.
import admin from 'firebase-admin'

const serviceAccount = {
  projectId: process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID,
  client_email: process.env.FIREBASE_CLIENT_EMAIL,
  private_key: process.env.FIREBASE_PRIVATE_KEY?.replace(/\\n/g, '\n'),
}

if (!admin.apps.length) {
  admin.initializeApp({
    credential: admin.credential.cert(serviceAccount),
    databaseURL: `https://${process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID}.firebaseio.com`,
  })
} else {
  admin.app()
}

export default admin

Relevant Code:
In my opinion, the transition to version 13.0 involved switching to use google-auth-library, which seems to be causing this issue.
maybe auth.fromJSON() cause error
src/app/credential-internal.ts  456 line
function populateGoogleAuth(keyFile: string | object, httpAgent?: Agent)
  : { auth: GoogleAuth, client: AnyAuthClient | undefined } {
  let client: AnyAuthClient | undefined;
  const auth = new GoogleAuth({
    scopes: SCOPES,
    clientOptions: {
      transporterOptions: {
        agent: httpAgent,
      },
    },
    keyFile: (typeof keyFile === 'string') ? keyFile : undefined,
  });

  if (typeof keyFile === 'object') {
    if (!util.isNonNullObject(keyFile)) {
      throw new FirebaseAppError(
        AppErrorCodes.INVALID_CREDENTIAL,
        'Service account must be an object.',
      );
    }
    client = auth.fromJSON(keyFile);
  }
  return { auth, client };
}

google-auth-library /src/aut/jtwclient.js 206 line
  fromJSON(json) {
        if (!json) {
            throw new Error('Must pass in a JSON object containing the service account auth settings.');
        }
        if (!json.client_email) {
            throw new Error('The incoming JSON object does not contain a client_email field');
        }
        if (!json.private_key) {
            throw new Error('The incoming JSON object does not contain a private_key field');
        }
        // Extract the relevant information from the json key file.
        this.email = json.client_email;
        this.key = json.private_key;
        this.keyId = json.private_key_id;
        this.projectId = json.project_id;
        this.quotaProjectId = json.quota_project_id;
        this.universeDomain = json.universe_domain || this.universeDomain;
    }

Hi @k-redstone ,
Thank you for reporting this issue.  I think this is a bug. Let me start working on a fix and in the meantime, your workaround seems reasonable. You can also try setting the GOOGLE_APPLICATION_CREDENTIALS env variable to point to the service account json file as an alternative.

I can also confirm the I can confirm the same thing happened to me yesterday! While I didn’t investigate as thoroughly, I did roll back to a previous version of the admin SDK, but I still received the same error message, and I’m initializing it the same way as the OP. Thanks for taking care of it! 🙏

I came here to file this exact issue as I was banging my head all afternoon trying to understand how this first step was not working! Thanks @k-redstone for filing the issue.

Yup it happened to me too, after changing to client_email and private_key its solved

Same here!
Error output:
ERROR [ExceptionsHandler] Credential implementation provided to initializeApp() via the "credential" property failed to fetch a valid Google OAuth2 access token with the following error: "The incoming JSON object does not contain a client_email field".

I encountered the same issue when upgrading to v13.0.0.
FirebaseAppError: Credential implementation provided to initializeApp() via the "credential" property failed to fetch a valid Google OAuth2 access token with the following error: "The incoming JSON object does not contain a client_email field".

The problem doesn't occur in the latest v12.* version (v12.7.0).

Thanks for your patience folks! This issue is now fixed in v13.0.1. Please open a new issue if you run into any problems.


[bugfix] preserve order in groupby

Recently in
https://github.com/apache/incubator-superset/commit/4c3313b01cb508ced8519a68f6479db423974929
I introduced an issue where the order of groupby fields might change.
This addresses this issue and will preserve ordering.

Coverage increased (+0.02%) to 69.32% when pulling b7aec31e923fee99f1c3c1221c5f0a1328fa7007 on mistercrunch:fix_order into 327c052456c7c4a3aa8e5e90eb2874915d539913 on apache:master.

Coverage increased (+0.01%) to 69.315% when pulling 063f5bb59263910c0e739d8f8095e61e60c6f3ad on mistercrunch:fix_order into 327c052456c7c4a3aa8e5e90eb2874915d539913 on apache:master.


removed @uimaxbai's grabify link and some other small tweaks

Hope you accept these qol and phrasing fixes

also removed the grabify link from @uimaxbai @rocketman12435 please merge this

do it

must be done with haste

I did not add any of such link. The commit history clearly states that @rocketman12435 did it.

Also there is inappropriate language in the SECURITY.md file, I would recommend not merging this.

nvm its been changed

It also puts my name in strikethrough in the index.html file (very inappropriate, do not accept).

I did not send any link of such, the commit history clearly states that @rocketman12435 placed it in.

I did not place any link of such, the commit history clearly states that @rocketman12435 placed it in.

Actually Max I didn't change anything, I just added all the files that were in the previous repo to a new repo

Anything you have put on the files, be it helpful or not, has been put into the repo, so you must tell me where it is to remove it

it's on the login page its the long link I removed (its a grabify link click it to find out)


Add publish_date to feed

Resolves #60

Thank you! Just published 0.32.0 which includes this change.


Example text document

Today's Project, already a pro thanks to Sydney!

This makes my heart so happy! Thank you!


Make ad_util.zero a class that carries avals (similar to UndefinedPrimal)

This is useful for remat transpose rule submitted in #3162 and e.g.
allowed me to catch a slight overuse of defjvp2 for random_gamma_p (it
was unnecessarily declared as having multiple outputs).

Turns out removing the example/aval arguments was really tricky! I did manage to get rid of it for instantiate_zeros, which has uncovered a bug in vmap that I've fixed, but it turns out that instantiate_zeros_aval is sometimes used to replace abstract unit zeros with some shaped avals, so I had to leave it as is.


non-critical-infra: hetzner-01 bootstraping

Closes https://github.com/NixOS/nixos-org-configurations/issues/260
I have bootstrapped the machine for the non-critical infra team.
Added keys for @zimbatm, @mweinelt and myself so far. This PR is for information (because the machine has de facto the configuration described here) and I will merge it after 24h.

thanks!


[Series2] Fix handling start/end of Long range in RangeObservable

(cherry picked from commit b6ffb22ccfc5358d81a67e22c5f30624fc9b3201)

We can. I'll do it tonight.


Autogen.sh should invoke configure at the end of the script

Automated build tools such as GNOME`s jhbuild expect that autogen.sh invokes configure when its done preparing the build system. Please consider to call configure rather then printing the configure command.
If you need to disable this conditionally, then consider to make this conditional on an environment variable such as NOCONFIGURE, for an example see the GNOME Common Migration page.

See my answers on #104
I could check a CONFIGURE env var. But checking NOCONFIGURE would change the default behavior of autogen.sh which I won't do for several reasons.


DSL for inline functions

My proposal for the zero DSL we shortly discussed in #22 - that is also working with the nim syntax parser:
zero:
  map(conversion)
  pre:
    var next = conversion
    if indexed: # find out indexed -> either as proc-parameter or `ext`.indexed
      next = (idx, conversion)
  loop:
    let it = next # also tricky: adding backticks when needed...

zero: follows the definition
name(parameters)(parametersToInlineProc)
sections:

pre or prepare initialize variables and constants
init variable initialization before the loop (ext.initials)
loop the actual loop action (ext.node)
end added to end of the loop (ext.endLoop) - maybe not necessary
final after the loop section - set the result (ext.finals)
res shortcut for setting the result
delegate delegate to other functions (like map, filter, etc.)

The above map could (hopefully) be translated to:
proc inlineMap(ext: ExtNimNode, indexed=false) : ExtNimNode {.compileTime.} =
  if ext.node.len != 2:
    zfFail("number of parameters for 'map' must be 1! - for tuples use extra brackets.")
  let conversion = ext.adapt(1) # this is simply assigning each parameter
  # pre: this will be tricky - when referencing input parameters: a quote is needed
  var next = quote:
    `conversion`
  if indexed:
    let idxIdent = newIdentNode(zfIndexVariableName)
    ext.needsIndex = true
    next = quote:
      (`idxIdent`, `conversion`)
  # loop:
  let itIdent = ext.nextItNode()
  ext.node = quote:
    let `itIdent`= `next`
  result = ext

While map is not yet implemented - I got already:
zero:
  filter(test)
  loop:
    if test:
      nil

or:
zero:
  dropWhile(cond)
  init:
    var gate = false
  loop:
    if gate or not cond:
      gate = true
      nil

This version: see gist
Alternative: see gist
# normal inline function
zf_inline index(cond):
  init:
    result = -1
  loop:
    if cond:
      return idx

# function yielding an iterator
zf_iterator dropWhile(cond):
  init:
    var gate = false
  loop:
    if gate or not cond:
      gate = true
      nil

any thoughts? 💡

wow, amazing. this already works for those examples, right?

it really does look almost simple.
If it's not yet fully implemented, how much work is it?  I was going to suggest you to not put too much work in the lib, if maybe fixing iterator chaining in Nim is possible. Just writing an iterator as in other languages will be probably always the best option (for Nim itself, lowers barrier for new users). Still, I asked core devs, and IIRC it's not very easy to add it right now, so probably our(and loopfusion) approach is still without an alternative.
On the other hand this looks very cool and it will probably make it feasible for most users to extend it.

why can't map be
map(f)
loop:
  f(it)

btw how do you convert test to test(it) ? and is that simpler for the user, or too magical?

Sure - maybe we could do map like that... And indexed...-bla as an extra function - there are not so many indexed-functions anyway. Maybe I was thinking along too generic approaches - that in themselves are complicated again.
but anyway - map in that sense had to be:
zero:
  map(f)
  loop:
    let it = f

or
zf_iterator map(f):
  loop:
    let it = f

Not sure about f(it) - so to say defining your own iterator with it - but I don't think neither me nor the user would get how to do that 😉
So - it for me is still fixed and left-hand side it of = use triggers creating a new iterator - other it accesses the previous iterator.
So - which approach do you like more:
zero:
  myfun(...)
  ...

or
zf_inline myFun(...):
 ....

or any other ideas?!

... so - there is some cleanup to do, when we want to use the new DSL in our code and in the examples - not sure if it is feasible to convert everything to the new DSL - especially functions like sub or combinations. But still this approach leaves it open to the user if he/she maybe first uses the DSL and then - if the function needs to be more complicated - can output the created function with repr and use and extend it instead of the DSL one.
when using  the DSL however - I think we are also able to auto-generate the extension function, maybe a default function for zero-functional itself - and using zfIterator vs zfInline (or similarly named macros) - the iterator is possible as in-between argument or generates a collection as last and the other one can only be used as last argument in the chain. Such checks could be done automatically.
Also: check for the number of parameters - maybe even, as you first suggested - optional types for the parameters (which is also kind of a documentation for the user) can also be checked by the compiler.
... so lots of ideas

... I added a new branch for zero-dsl - with the
zf_inline functionName(params):
  ...

syntax.
functions that set or return a result have to be last element, all other may return an iterator.

sorry for the late reply, i've seen the issues, always forgetting to actually write here

so yeah this looks good, let's merge zf_inline if it seems ready

... still have to document.
I'm also thinking about simplifications - especially concerning the collection result type. Maybe in case of returning a collection the result could first be created in  a separate iterator, then the result type of the iterator is determined and used for the overall resulting collection type.

The general idea would be to generate the code like that (and use also types other than seq) - when the result should be a collection:
import macros, typetraits, zero_functional

macro iteratorTypeTd(td: typedesc): untyped =
  td.getType[1][1]

macro iteratorType*(td: untyped): untyped =
  quote:
    iteratorTypeTd(`td`.type)

when isMainModule:
  let a = @[1,2,3]

  # do some transformation and return the result as iterator
  iterator autoIterator(): auto =
    for it0 in a:
      let it1 = it0 * 2
      let it2 = $it1
      yield it2

  # use the iterator - also to determine the result type
  let a2 = (
    proc(): auto =
      var res: seq[iteratorType(autoIterator)]
      result = zfInit(res)
      var idx = 0
      for it in autoIterator():
        zfAddItem(result, idx, it)
        idx += 1)()
  echo(a2)

OK - let's do it!


Projects

Here is the PR containing the repo –> project changes, at the moment is failing because I wasn't able to merge or rebase from master, to include the commit requests, required by the tests.
PS: I have no idea how to merge this. project.pbxproj is pure hell when it comes to merge conflicts.
Nobody's born knowing 👍

Tests seem to fail for macOS:
CommitTests
❌  fatal error: unexpectedly found nil while unwrapping an Optional value

Fixed, after this one I'll just open the one for the login –> username changes, and after that it's pretty much ready for major release?

2017-02-22 22:40:57.828 xcodebuild[16482:31076] Error Domain=IDETestOperationsObserverErrorDomain Code=3 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/travis/Library/Developer/Xcode/DerivedData/TanukiKit-fvezsfumqfjrojegffuqyyeakarq/Logs/Test/B5D72806-DA2D-4705-AD6E-CB903AB72D8B/Session-TanukiKitTests-2017-02-22_224056-ZN9N3c.log" UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/travis/Library/Developer/Xcode/DerivedData/TanukiKit-fvezsfumqfjrojegffuqyyeakarq/Logs/Test/B5D72806-DA2D-4705-AD6E-CB903AB72D8B/Session-TanukiKitTests-2017-02-22_224056-ZN9N3c.log}

@pietbrauer Travis seems to be having a hard time with this one, took it hours to start and then failed within 5 minutes?

@pietbrauer: Am I seeing things, or did that space in the end of the declaration mess up the whole CI process?

No, it messed up Xcode. I just opened the project in Xcode, clicked on the "Fix it" button and the build error went away.

Hmm interesting, everything ran perfectly on mine? Even the CI commands.


User agent as a user-preference

Description
Ability for the user to specify a user-agent string as a service-specific preference.
Motivation and Context
As being discussed in #1239 - but, this is more of a POC to shake out what this direction might solve/uncover.
Screenshots
Please note the Git branch:

User Preferences screen:

Service Developer tools showing the user-agent being sent on the network request:

Checklist:

[x] My pull request is properly named
[x] The changes respect the code style of the project ($ npm run lint)
[x] I tested/previewed my changes locally

Btw, here are the quirks for user agents strings that WebKitGtk uses: https://github.com/WebKit/WebKit/blob/main/Source/WebCore/platform/UserAgentQuirks.cpp
We're in a bit better situation, because we're already Chromium, but we do already have a similar quirk for accounts.google.com in models/Service.js.

Please apply this. Google Chat users were left out:

@kris7t - after some of the refactorings from one of your earlier PRs in the recent past, this code doesn't seem to work anymore (ie the screen-capture up above is no longer true). I am unable to find the issue. Could you please help asap? I would like this PR to get into the next release asap.

@vraravam Basically, you'll need to handle the changes in the UserAgent model now (probably by synchronizing the service's userAgentPref to its userAgentModel at runtime).
I'm still not too fond of this, and would much prefer something like the browserlist database and useragent-generator to be able to say things like "latest Chromium on macOS" or "Firefox ESR on Linux", so recipes and users don't constantly have to update the User-Agent string. My concern is that if we release the simple version of this with a free-form User-Agent textbox, it'll be quite difficult to migrate the settings to one that auto-updates the browser versions.
On the other hand, I do recognize that we need a quick fix, so maybe it's the best to merge this indeed and deal with migrating to a better solution later.

Yes - that should become incrementally trivial. This PR is more for the ability to specify a global value and in some cases being overridden by the service-based on. Since I am unable to figure out where the problem is, could you please help?

Sure, I'll try to look at it later today.

@kris7t - thanks for solving the issue that was half-done.
For the reviewers, the order of priority is bascially

user override for service
user-agent from service recipe
global user override
electron default

(a full override of request headers from the recipe still "wins" over these, but those are rare)
(and we remove the Chrome version on Google login screens).
We refactored the todos webview to also use the UserAgent model, so the same settings (and the chromeless hack for google login) should apply there, too
On the settings screen, the input placeholder (gray text shown in the field if it is empty) shows what value will be sent if there's no override by the user.


pip install -e . does not install chainforge

If you were to git clone the repo, then do pip install -e . it will install all dependency and say it installed chainforge, however if you were to boot up the Docker container it will say chainforge isn't a module (this also happens without a docker container)
FROM python:3.10

WORKDIR /chainforge

COPY chainforge .
COPY setup.py .
COPY MANIFEST.in .
COPY README.md .
RUN pip install -e .

ENTRYPOINT [ "chainforge", "serve", "--host", "<IP_ADDRESS>" ]

docker build -t chainforge .
docker run -p 8000:8000 chainforge
Will always result to this error
Traceback (most recent call last):
  File "/usr/local/bin/chainforge", line 33, in <module>
    sys.exit(load_entry_point('chainforge', 'console_scripts', 'chainforge')())
  File "/usr/local/bin/chainforge", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/local/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'chainforge'

I think this PR fixed the issue for Docker containers? Let me know. https://github.com/ianarawjo/ChainForge/pull/305/commits/e9da6bc1b2c847a7173328bcdfa02e80ea1cc848

So it does build, but inside docker you keep getting 500 error
Seems like the problem is that your setting Flask dir as
BUILD_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'react-server', 'build')
But the correct folder is public instead of build..., when I do that change then the 500 error goes away but im greeted to basically an empty page

Still debugging this and when I find what is happening ill report back

The code published here cannot be built from source.
What commands are required?
FROM python:3.12-slim AS builder

RUN pip install --upgrade pip
RUN git clone https://github.com/ianarawjo/ChainForge.git
COPY . .
RUN pip install -e .

WORKDIR /chainforge

EXPOSE 8000
ENTRYPOINT [ "chainforge", "serve", "--host", "<IP_ADDRESS>" ]

Is there something different needed to install this?

I figured it out. Ok so I am assuming this git repo is one version behind or something close to that? I ended up having to download th tar file from https://pypi.org/project/chainforge/#files and only then could I build and run. Is it possible to update the git repo?

Welp this was a full blown circus show on my part, which was entirely my fault. I hadn't seen https://chainforge.ai/docs/for_dev/ as it was hidden (please move that out of Misc) so anyway, once I found that out it worked. As a token of appreciation here is a Dockerfile for anyone else who want to develop on this inside of Docker.
FROM node:latest

# Install dependencies for building Python
RUN apt-get update && \
    apt-get install -y \
        wget \
        build-essential \
        libreadline-dev \
        libncursesw5-dev \
        libssl-dev \
        libsqlite3-dev \
        tk-dev \
        libgdbm-dev \
        libc6-dev \
        libbz2-dev \
        libffi-dev \
        zlib1g-dev && \
    # Clean up
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Download and install Python 3.10
RUN wget https://www.python.org/ftp/python/3.10.13/Python-3.10.13.tgz && \
    tar xzf Python-3.10.13.tgz && \
    cd Python-3.10.13 && \
    ./configure --enable-optimizations && \
    make altinstall && \
    cd .. && \
    rm -rf Python-3.10.13 Python-3.10.13.tgz

# Install pip for Python 3.10, you can go higher if wanted but stay within the 3.10 series at minimum
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10

# Make python3.10 the default python3
RUN update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.10 1 && \
    update-alternatives --install /usr/bin/python python /usr/local/bin/python3.10 1

# Verify installations
RUN node -v && npm -v && python3 --version && pip3 --version

# Set the working directory
WORKDIR /app

#for static build
EXPOSE 8000

#For dynamic runtime, pref for devs
EXPOSE 3000

ENTRYPOINT [ "/bin/bash" ]


External configuration webinterface

As already pointed out on discord I would like the idea to have a external webinterface. So that you would be able to configure PicCap with a browser from a desktop or a smartphone instead of using the app on the TV.
It could be implemented like that: standalone app for example in Google Go (native) which serves a http server + webinterface. When the user uses the save functionality a json configuration file is written to a predefined location on the TV where the new PicCap service can pick it up and work with it.
This would be the MVP in my eyes. After that it could be extended for more features like multiple configurations (if needed), screen live view or whatever is needed.

Which settings do you expect to change that frequently to the point of needing a web interface?
I mean, it'd be useful, sure, but not really an MVP imho, considering the set and forget nature of this app...
Just my 2 cents, of course :)

at first look web interface can be used to check app startup and if it not - start with dev tools/ssh for example

@psychowood: You are right about the fact that its mostly a config and forget thing. But you could also integrate features which make it more comfortable to use for users who don't have so much technical knowledge. For example we could show all the log messages in a text area or a button to download the log. In case of an error a user could simply copy the output and pass it directly to discord and/or a github issue etc.

As someone who doesn't own the magic remote and is stuck using buttons, being able to configure the settings from my phone would be so much nicer.


Merge Xamarin/WindowsForms/Platform targets into one csproj (multiple nuget package IDs)

Note: for support questions, please ask on StackOverflow: https://stackoverflow.com/questions/tagged/reactiveui . This repository's issues are reserved for feature requests and bug reports.
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
Targets that don't have a dedicated TFM are built as separate csproj files, which increases the maintenance overhead a bit.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
What is the expected behavior?
What is the motivation / use case for changing the behavior?
Reducing maintenance overhead, and possibly creating an easier route to adding a new platform.
Which versions of ReactiveUI, and which platform / OS are affected by this issue? Did this work in previous versions of ReativeUI? Please also test with the latest stable and snapshot (http://docs.reactiveui.net/en/contributing/snapshot/index.html) versions.
Other information (e.g. stacktraces, related issues, suggestions how to fix)
I think it should be possible to do some csproj magic to effectively create a "target" of Xamarin.Forms for example, that creates a separate nuget package, effectively targets netstandard1.3 and includes the XamForms packages as required.

I can see this getting pretty messy. Visual Studio (for me) has been pretty sketchy with multi-targeting and at this stage would prefer not to complicate our builds further. Doing this would involve defining some custom property/leaning on @onovotny for some advice.  My preference is to leave things as is for now.
<PropertyGroup>
    <TargetFrameworks>netstandard1.1;net45;uap10.0;Xamarin.iOS10;Xamarin.Mac20;MonoAndroid70</TargetFrameworks>
    <PackageId>reactiveui</PackageId>
</PropertyGroup>

I'm not sure I follow the suggestion? You want to have a single project generate different packages? That could be possible but does sound messy. Using files from a shared location via Include="..\Shared\**\*.cs" sounds cleaner?

My feelings aren't hugely strong on this, but I guess it's that we're effectively having to treat the XamForms, WinForms and other platforms very differently from the platforms that have TFMs supported (e.g. UWP, Tizen), and if we could effectively wrap XamForms to treat it as a separate platform, then we don't have the problem of shared code etc.
The other question is whether we should be treating XamForms/WinForms as a target for ReactiveUI or as a set of extensions that make it easier to integrate on top of the e.g. NetStandard/Net45 targets.


Copy PGN modifier keys when pressed multiple times

open the analysis move context menu
press Alt and hold (it should show copy to position)
release Alt and press and hold again

Nothing shows, even if the copy pgn feature works.

Fixed in v2.3.111


⚠ ClamAV has degraded performance

In bd8cd1b, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 483 ms

Resolved: ClamAV performance has improved in ea81818.


Hebrew support in the console

You commit is not registered to your user
Also, please update your profile picture
And, there are some unneeded changes so you can discard
Lets meet tomorrow to fix the issues


Added support for numberOfLines and its setting

Changes have been made to automatically adjust the height of table rows depending on the text.
Also added the ability to adjust the numberOfLines of the standard cell
By default numberOfLines = 1

If anyone wants to install, add this to podfile
pod 'DropDown', :git => 'https://github.com/VestaCute/DropDown'


⚠ Bofrost.lu has degraded performance

In f13d33f, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 2237 ms

Resolved: Bofrost.lu performance has improved in 477074f after 6 minutes.


Allow metric and label names to begin with underscores

While this is not recommended, it is allowed in our data model
(https://prometheus.io/docs/concepts/data_model/).
Fixes https://github.com/prometheus/prometheus/issues/2959

:+1:


Account for workdir or compute in env factory

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

Current dependencies on/for this PR:

main

PR #353

PR #354   👈

This stack of pull requests is managed by Graphite.


Add nodata example to collections

For me it seems the most useful example. In particular, if we want to parallelize collections download we can first fetch all keys then split on batches.
I would also like to add nodata to both items and collectionsiter(), but I don't know how to do it.

Closes #124

Thanks @manycoding :+1:


Make the title clickable

When you click on the title of the website, it redirects to the homepage. So whichever segment you are in of the website, you can easily return to home page with one click.

I want to add this feature under JWOC'23.

@zugzwang03 Go for it.


Add cdc paper examples

CDC paper examples. Merge after test.
Resolves #116

great examples. works perfectly on my machine.
will be merged after earlier PRs are addressed, and rebase done,


Variable substitution does not allow default values containing a colon

The current implementation does not support default values in localEnv or containerEnv substitution that include a colon.
Example:
 "WEBSITE_URL": "${localEnv:WEBSITE_URL:https://example.com"

Current behavior: If $WEBSITE_URL is not present, the variable is just set to https
Expected behavior:  If $WEBSITE_URL is not present, the variable should be set to https://example.com

PR #882


Code Error

The code in Step 3 has 2 extra braces in it after setting the GetLeaderboardRequest  members.

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

ID: 43375317-84cb-a9ec-751a-e265e30a8369
Version Independent ID: dac76237-fef1-9fd7-6101-0206806be27e
Content: Tournaments & Leaderboards quickstart - PlayFab
Content Source: playfab-docs/features/social/tournaments-leaderboards/quickstart.md
Product: playfab
GitHub Login: @v-thopra
Microsoft Alias: v-thopra

Thanks for the heads up. A fix has been merged.


Unflatten the Config/MainConfig struct

This works around a known serde problem when wrong error messages are generated with flattened fields (by implementing the suggestion from @sharkdp in https://github.com/sharkdp/numbat/issues/295#issuecomment-1913349841)
Closes #295

Thank you very much!


Two tests failed after successful compilation by msvc on the windows x64 platform

Describe the bug
When I used the code compiled by msbuild for unit testing, the test failed. The specific failure is as follows：
Test project F:/google/glog/build_amd64
      Start  1: demangle
 1/14 Test  #1: demangle .........................   Passed    0.04 sec
      Start  2: logging
 2/14 Test  #2: logging ..........................   Passed    0.48 sec
      Start  3: signalhandler
 3/14 Test  #3: signalhandler ....................   Passed    0.04 sec
      Start  4: stacktrace
 4/14 Test  #4: stacktrace .......................   Passed    0.03 sec
      Start  5: stl_logging
 5/14 Test  #5: stl_logging ......................      Passed    0.03 sec
      Start  8: cmake_package_config_generate
 8/14 Test  #8: cmake_package_config_generate ....   Passed    2.74 sec
      Start  9: cmake_package_config_build
 9/14 Test  #9: cmake_package_config_build .......***Failed    1.89 sec
Microsoft (R) Build Engine version 16.11.1+3e40a09f8 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
  Checking Build System
  Building Custom Rule F:/google/glog/src/package_config_unittest/working_config/CMakeLists.txt
  glog_package_config.cc
LINK : fatal error LNK1104: cannot open file 'F:\google\glog\build_amd64\Debug\glogd.lib' [F:\google\glog\build_amd64\test_package_config\working_config\glog_package_config.vcxproj]
      Start 10: cmake_package_config_cleanup
10/14 Test #10: cmake_package_config_cleanup .....   Passed    0.03 sec
      Start 11: cleanup_init
11/14 Test #11: cleanup_init .....................   Passed    0.02 sec
      Start 13: cleanup_immediately
12/14 Test #13: cleanup_immediately ..............   Passed    3.19 sec
      Start 14: cleanup_with_prefix
13/14 Test #14: cleanup_with_prefix ..............   Passed    3.19 sec
      Start 12: cleanup_logdir
14/14 Test #12: cleanup_logdir ...................   Passed    0.02 sec
86% tests passed, 2 tests failed out of 14
Total Test time (real) =  11.81 sec
The following tests FAILED:
	  6 - symbolize (Exit code 0xc0000409
)
	  9 - cmake_package_config_build (Failed)

To Reproduce
Steps to reproduce the behavior:
1. git clone https://github.com/google/glog
2. git -C "F:\google\glog" rev-parse --git-dir
   git -C "F:\google\glog" clean -xdf
   git -C "F:\google\glog" fetch --recurse-submodules=no --force
   git -C "F:\google\glog" reset --hard 3369666
   git -C "F:\google\glog" remote prune origin
3. set VSCMD_SKIP_SENDTELEMETRY=1 & "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64
4. cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DCMAKE_BUILD_TYPE=Release ..
5. msbuild /m /p:Platform=x64 /p:Configuration=Release glog.sln /t:Rebuild /p:BuildInParallel=true
6. ctest --build-config Release --output-on-failure

Expected behavior
All test pass.
Observed Behavior
Unit test failed.
Environment
OS: Windows Server 2016 1607
CPU: AMD EPYC 7452 32-Core Processor
Compiler: MSVC 14.29.30133
Language: ENU

On the x86 platform, the build failed, and the specific error information is as follows:
21>F:\google\glog\src\googletest.h(565,15): error C2664: 'HANDLE CreateThread(LPSECURITY_ATTRIBUTES,SIZE_T,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD)': cannot convert argument 3 from 'DWORD (__cdecl *)(void *)' to 'LPTHREAD_START_ROUTINE' [F:\google\glog\build_amd64\demangle_unittest.vcxproj]
       F:\google\glog\src\googletest.h(567,28): message : This conversion requires a reinterpret_cast, a C-style cast or function-style cast [F:\google\glog\build_amd64\demangle_unittest.vcxproj]
       C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\processthreadsapi.h(170,1): message : see declaration of 'CreateThread' [F:\google\glog\build_amd64\demangle_unittest.vcxproj]
    21>Done Building Project "F:\google\glog\build_amd64\demangle_unittest.vcxproj" (Rebuild target(s)) -- FAILED.
     5>Done Building Project "F:\google\glog\build_amd64\demangle_unittest.vcxproj.metaproj" (Rebuild target(s)) -- FAILED.
    27>F:\google\glog\src\googletest.h(565,15): error C2664: 'HANDLE CreateThread(LPSECURITY_ATTRIBUTES,SIZE_T,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD)': cannot convert argument 3 from 'DWORD (__cdecl *)(void *)' to 'LPTHREAD_START_ROUTINE' [F:\google\glog\build_amd64\utilities_unittest.vcxproj]
       F:\google\glog\src\googletest.h(567,28): message : This conversion requires a reinterpret_cast, a C-style cast or function-style cast [F:\google\glog\build_amd64\utilities_unittest.vcxproj]
       C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\processthreadsapi.h(170,1): message : see declaration of 'CreateThread' [F:\google\glog\build_amd64\utilities_unittest.vcxproj]
    22>F:\google\glog\src\googletest.h(565,15): error C2664: 'HANDLE CreateThread(LPSECURITY_ATTRIBUTES,SIZE_T,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD)': cannot convert argument 3 from 'DWORD (__cdecl *)(void *)' to 'LPTHREAD_START_ROUTINE' [F:\google\glog\build_amd64\logging_unittest.vcxproj]
       F:\google\glog\src\googletest.h(567,28): message : This conversion requires a reinterpret_cast, a C-style cast or function-style cast [F:\google\glog\build_amd64\logging_unittest.vcxproj]
       C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\processthreadsapi.h(170,1): message : see declaration of 'CreateThread' [F:\google\glog\build_amd64\logging_unittest.vcxproj]
    27>Done Building Project "F:\google\glog\build_amd64\utilities_unittest.vcxproj" (Rebuild target(s)) -- FAILED.
    14>Done Building Project "F:\google\glog\build_amd64\utilities_unittest.vcxproj.metaproj" (Rebuild target(s)) -- FAILED.

You can check build error messages from attached file build.log

Our CI completes the tests on x86_64. Thus, the exact steps allowing to reproduce the problem are necessary.
Please create another issue for x86 compilation errors, including the individual setup steps.

Nevermind. I could reproduce both problems.


Order of articles in "articles" menu and frontpage "advanced"

We should use the same order as Coda instead of the default order

Fixed


Info about Unity's editor attaching checkbox

Addresses issue #676 @conceptdev

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/cross-platform/using-visual-studio-tools-for-unity.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@dantogno thank you for contributing!


Separate pass.h from passes.h

Future pass implementations should only need to include pass.h
This is also necessary for the implementation of pass registry to support -load=*.so in future.

+2


[FEATURE]how add code interpreter?

]how add code interpreter?

If you are willing to use E2B to run code, you could uncommen the code inside the tool for it and then rebuild your project.
The  tool can be found here:
packages\components\nodes\tools\E2B

E2B Code Interpreter now officially supported!


Updated the github workflow to generate the JSON schemas and Definitions for OSM components

Signed-off-by: sayantan1413<EMAIL_ADDRESS>Description
Updated the github workflow to generate JSON Schema and Definitions for OSM components
This PR fixes #93
Notes for Reviewers
Signed commits

[x] Yes, I signed my commits.

@utkarsh-pro review when you have a few moments, if you would.

Diff for the commit containing generated components: https://github.com/sayantan1413/meshery-osm/commit/7ede264abde811e2f488541c400062c87467137c#

Hey @DelusionalOptimist is there anything odd ?

Hey @DelusionalOptimist is there anything odd ?

Looking good @sayantan1413, just some comments for other reviewers :smile:

@utkarsh-pro @leecalcote
https://github.com/sayantan1413/meshery-osm/blob/7ede264abde811e2f488541c400062c87467137c/templates/oam/workloads-v0.9.1/egressosm.meshery.layer5io.schema.json#L104
Is it fine to use OSM? SMP protos call it OPEN_SERVICE_MESH

Unless using the long form of the service mesh name messes things up, yes, ideally, we're using what is defined in the spec.
Why is there no separator between the name of the object and the name of the service mesh (e.g. egressosm --> egress.osm)?

Why is there no separator between the name of the object and the name of the service mesh (e.g. egressosm --> egress.osm)?

Hmm :thinking:. Not sure about this.
We don't have separators in any of the old, self-added Istio components
https://github.com/meshery/meshery-istio/blob/4376fa99dc638285b48f4d1392e7a8091028865b/templates/oam/workloads/envoyfilter_definition.json#L5
So we tried to do the same here too.
But I think we should have separators. What do you say @utkarsh-pro

Yup I also think the seperator would be better here.🤔

I assume that lack of separation is not for any other reason than @utkarsh-pro didn't get to it, yet. There's much merit to having a separator so that proper classification and display of these operations can ensue.

Yeah, we had to place separators in the names of the components. A related issue regarding the same was/is being tracked here: https://github.com/meshery/meshery-istio/issues/229
// @DelusionalOptimist @sayantan1413 @leecalcote

Who is taking this issue forward?

Hey @leecalcote I would like to try out a bit to put a separator.

Thanks @sayantan1413 :slightly_smiling_face:

How'd you make out, @sayantan1413?


BlockILU for systems of PDEs

Hi Will @pazner,
I had a quick look at the BlockILU class.  How difficult would it be to adapt this to continuous-Galerkin-type discretizations, where the blocks are based on the conservative variables, for example?  Also, does it use non-overlapping additive Schwarz in parallel, or something else?
Thanks in advance,
Jason

Hi @jehicken,
If I understand correctly, you would like to do block ILU, where the blocks correspond to all the conservative variables at a single node? The easiest way to achieve this would be to use the ordering of degrees of freedom Ordering::byVDIM so that all the components for a single node appear consecutively. Then, setting the block size to the number of components should have the desired effect.
In parallel it is currently non-overlapping additive Schwarz, simply for ease of implementation. I'm sure we would be open to something more sophisticated.
Hope this helps,
Will

Yes, I would like all the conservative variables at a single node, so the block CSR storage would use  5x5 block matrices in 3D.  We were already using Ordering::byVDIM, so hopefully it will be a simple swap of the preconditioner.
Thanks!


Update JS collocation guidance

Fixes #31321
Thanks @gregoryagu! 🎸 ... This should fix both problems ...

I call out what module is as a private nullable JS object ref field, and I fix up our JS collocation guidance by using two INCLUDE files now, one for 7 or earlier with Index for Blazor and one for 8 or later with Home for Blazor, noting that MVC/RP have retained Index at 8.0.
~I also noticed that we had an error in our RP JS collocation coverage. That feature didn't come in until 6.0, but the RP doc didn't version the INCLUDE, so it was showing incorrectly for 3.1 and 5.0. I fixed that up.~ CORRECTION: No, there was a 6.0 moniker early in the article that I didn't see at first. It was good, but there's another problem with duplicate headings. I might need to back the changes out of the RP until Rick can take a look and adjust the article himself on a different PR later.

Thanks for the issue and Happy New Year! 🎉🍾💃🕺🥳

Internal previews

📄 File
🔗 Preview link

aspnetcore/blazor/components/class-libraries.md
Consume ASP.NET Core Razor components from a Razor class library (RCL)

aspnetcore/blazor/hybrid/static-files.md
ASP.NET Core Blazor Hybrid static files

aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md
Call JavaScript functions from .NET methods in ASP.NET Core Blazor

aspnetcore/blazor/javascript-interoperability/index.md
aspnetcore/blazor/javascript-interoperability/index

aspnetcore/razor-pages/index.md
Introduction to Razor Pages in ASP.NET Core

Thanks Luke!  One more question:
My code doesn't actually work, but I am not sure why.  I followed the docs carefully, and this is what I come up with. But the code throws an error "Microsoft.JSInterop.JSException: 'Could not find 'showPrompt' ('showPrompt' was undefined)."
But showPrompt is getting correctly downloaded to the browser:

So it is unclear to me why the call to showPrompt does not work.
<PageTitle>Home</PageTitle>

@inject IJSRuntime JS;

<button @onclick="ExecuteShowPrompt">showPrompt</button>

@code{

    public async void ExecuteShowPrompt()
    {
        await JS.InvokeVoidAsync("showPrompt", "Hello World");
    }

    protected async override Task OnAfterRenderAsync(bool firstRender)
    {
        var module = await JS.InvokeAsync<IJSObjectReference>("import", "./Components/Pages/Home.razor.js");
        await base.OnAfterRenderAsync(firstRender);
    }

}

Call it from the module ... that's why module is set up as a field. Also, you'll dispose normally.
@page "/"
@rendermode InteractiveServer
@implements IAsyncDisposable
@inject IJSRuntime JS

<PageTitle>Home</PageTitle>

Home

<button @onclick="ExecuteShowPrompt">showPrompt</button>

@code {
    private IJSObjectReference? module;

    protected async override Task OnAfterRenderAsync(bool firstRender)
    {
        module = await JS.InvokeAsync<IJSObjectReference>("import",
            "./Components/Pages/Home.razor.js");
    }

    public async void ExecuteShowPrompt()
    {
        if (module is not null)
        {
            await module.InvokeVoidAsync("showPrompt", "Hello World");
        }
    }

    async ValueTask IAsyncDisposable.DisposeAsync()
    {
        if (module is not null)
        {
            await module.DisposeAsync();
        }
    }
}

I'm going to open a follow-up issue to improve the coverage on this. That way, I can get this PR in as more a 🪲 fix 😈, and then I'll have a little more time to flesh out the module use coverage.

🤔
Hummmmm ... I wonder if I can just place that example right in here right now and avoid a follow-up issue. Let me see .........................

Ok ... I think I found a much better way to manage all of this ...

Make one INCLUDE for just RP/MVC. Take out the Blazor parts.
Make a pair of INCLUDES for just Blazor, pre8 and 8 or later.
Show the full Home/Index example as a complete cut-'n-paste, fully working example.

BTW ... Check firstRender for module loading, which my first version of that example :point_up: didn't do. After it's loaded, you're good to go ... it's cached and doesn't need to be re-imported. I've updated that example :point_up:.

Ok, now I am tracking, and the sample is working great.  Thank you so much, that was very helpful. I did not get the concept before that you call "module..." after it was imported but it makes total sense now.

Ok, now I am tracking and the sample is working great.  Thank you so much, that was very helpful. I did not get the concept before that you call the "module..." after it was imported but it makes total sense now.

MUCH better ... glad I slept on it. The versioning can be dropped by moving off of Home/Index to just plain old user components. Also, I'd like to demo collocation with a standard JS FN/script and a JS module SxS with a pair of fully-working, cut-'n-paste examples. Later, both of these can go into the Blazor sample apps, so devs won't even need to cut-'n-paste them. I'm going to sleep on this for another night and make final changes tomorrow morning.

Ok ... that looks good. The examples will be moved into the sample apps later this week.
Nice job ... whoever did this. Of course, it wasn't ME 🦖. As everyone knows, I'm on vacation! 🙈😆


Make license of third-party sources more specific

We should make license of third-party sources more specific in the LICENSE file. For example, which file or which directory are using Intel SGX SDK.

Please refer Spark's LICENSE file: https://github.com/apache/spark/blob/master/LICENSE


Change xxHash implementation package

I've create benchmark for xxHash-implementations.
https://github.com/evorios/Hash.NET.Benchmark/blob/master/README.md
shibox_XXHash show interesting results.
But uranium62_xxHash same good on small data.

Merged with #40


Upsert/merge/insert or replace

Hey!
I've been wondering if it was possible to integrate some sort of upsert/merge command into gorp? Most databases seem to have some variant of this (MySQL and SQLite do seem to have it). Perhaps postgres could be a bit tricky, but might be solved by storing a session-visible procedure somewhere.
SQLite: http://stackoverflow.com/questions/3634984/insert-if-not-exists-else-update
NOTE: The idea would be to replace the struct entirely, or insert it (i.e.: a full update always)

The implementation in #174 is very interesting, we could definitely use that to implement this in v2.1.


[FEAT]: Create Issue forms and make the issue options more visually appealing

Currently, there is an issue template for this repo, but no issue form which will help users in contributing.

I will add Issue Forms to the respective issues to make it easier for the contributor to raise it.

Here is an example of how a Bug Issue Form will look like 👇

and issue templates:

I want to work on this issue. So, kindly assign this issue to me ( GSSOC'24 ).

Hey @Ajay-Dhangar, I have raised a PR #284 related to this issue. Please check it out.


Fix typos in README.

Current coverage is 72.80% (diff: 100%)

Merging #783 into master will increase coverage by 0.11%

@@             master       #783   diff @@
==========================================
  Files           107        107
  Lines         15994      15994
  Methods        2180       2180
  Messages          0          0
  Branches       1901       1901
==========================================
+ Hits          11625      11644    +19
+ Misses         3750       3731    -19
  Partials        619        619

Powered by Codecov. Last update 7b0280b...c870e93


New version: Tenpi.MusicPlayer version 0.2.9

Pull request has been created with komac v2.6.0 :rocket:
Microsoft Reviewers: Open in CodeFlow

URL: https://github.com/Moebits/Music-Player/releases/download/v0.2.9/Music-Player-Setup-0.2.9.exe
Status Code: 200
(Automated message - build 896)


Updating documentation for the Skywater ReRAM technology.

This doc update includes programming instructions, and technology
details not included in the original release.
Signed-off-by: Ethan Mahintorabi<EMAIL_ADDRESS>

@mithro @mguthaus This is an in progress doc commit for the ReRAM technology. I wanted to get out the important details as soon as possible. There's still a few seconds on multiple bit and multiple transistor programming that still needs to be added.


Add ClosureQueue

Adds a simple object implementing a list of callbacks to be invoked when an event occurs.
See https://github.com/amphp/byte-stream/pull/97

What exactly is this solving which a simple Future does not solve? Create it … then subscribe on it … and you'll get notified when it finishes.

Reusing Future for the same purpose can certainly work. Futures would be creating a number of extra objects, so there is a performance penalty. However the initial use-case for this was close notifications for streams, which isn't a particularly hot code path.
It's not uncommon for us to create lists of callbacks, though for this to be more reusable it should probably allow adding and removing callbacks and drop the destructor. Then it could be used within Future and Cancellable.

Future::finally() fits the bill since it doesn't pass the resolution value to the callback.
Closing this for now. On a second look the places where a list of callbacks is used have unique parameters passed to the callback, and storing these in another object will create circular references. Making a general purpose object is maybe then more trouble than it's worth for such a simple underlying structure.


Resulting dataframe doesn't have the results of last simulation when running 4 configurations

Hello,
I had an issue trying to execute cadCAD with multiple configurations. It works properly when running up to 3 configs. However, when the number of configs is increased to 4, the last configuration's result doesn't appear on the resulting dataframe, although the configuration count indicates the right number when executing run().
This is the run.py script:
# The following imports NEED to be in the exact order
from cadCAD.engine import ExecutionMode, ExecutionContext, Executor

# Simulation configs, input any new simulations here
from covid_19_sir import config
from covid_19_seir import config
from covid_19_seird import config
from covid_19_seir_3778 import config

from cadCAD import configs
import pandas as pd

def run(drop_midsteps: bool=True) -> pd.DataFrame:
    """
    Run all experiments and return their output on the dataset column.
    Each line represents an iteration of the parameter-sweep combinations.
    """
    exec_mode = ExecutionMode()
    multi_mode_ctx = ExecutionContext(context=exec_mode.local_mode)
    run = Executor(exec_context=multi_mode_ctx, configs=configs)
    raw_result, _, _ = run.execute()
    results = pd.DataFrame(raw_result)
    return results

The config scripts follow the same pattern:
MONTE_CARLO_RUNS = 1 # N monte carlo runs

from cadCAD.configuration.utils import config_sim
from cadCAD.configuration import Experiment
from .model.state_variables import genesis_states
from .model.partial_state_update_block import partial_state_update_block
from .model.sys_params import sys_params as sys_params
from .sim_params import SIMULATION_TIME_STEPS

sim_config = config_sim (
    {
        'N': MONTE_CARLO_RUNS,
        'T': range(SIMULATION_TIME_STEPS), # number of timesteps
        'M': sys_params,
    }
)

exp = Experiment()

exp.append_configs(
    sim_configs=sim_config,
    initial_state=genesis_states,
    partial_state_update_blocks=partial_state_update_block
)

If I change the order they are imported, the last config that was imported is still not on the dataframe.
Has anyone had a similar problem?

@Stefenon
Encountered this issue last night and found a solution
Hot-Fixing today

@Stefenon
Try it now
Sorry for the wait

Great! It's working properly now, thanks!


TypeError: Cannot read property 'cloneNode' of null

Version
3.1.2
Reproduction link
vite-project
Steps to reproduce
add console.log('----------------')
TypeError: Cannot read property 'cloneNode' of null

remove console.log('----------------')
TypeError: Cannot read property 'nextSibling' of null

What is expected?
no TypeError
What is actually happening?
TypeError
App.vue
<script lang="ts">
import { defineComponent } from 'vue'
import HelloWorld from './components/HelloWorld.vue'

console.log('----------------')
export default defineComponent({
  name: 'App',
  components: {
    HelloWorld,
  },
})
</script>

fixed via ba89ca9


cant start bpy after system shutdown or restart on wsl

Describe the bug
bpy has an error when executing after a shutdown or restart of wsl and you have to delete the database and re-import the sql file
To Reproduce
run bpy and then shutdown or reboot the system and try to run bpy again and get the error
https://youtu.be/5udn-7wrAQw
Expected behavior
so it works lol
bancho.py Version
4.7.2
Python Version
3.9.X (Default)
Relevant log output
lokillo@PC-GAMER:~/bancho.py$ make run
pipenv run python main.py
Loading .env environment variables...
ERROR:    Traceback (most recent call last):
  File "/home/lokillo/bancho.py/.venv/lib/python3.9/site-packages/aiomysql/connection.py", line 540, in _connect
    await self._request_authentication()
  File "/home/lokillo/bancho.py/.venv/lib/python3.9/site-packages/aiomysql/connection.py", line 854, in _request_authentication
    await self.caching_sha2_password_auth(auth_packet)
  File "/home/lokillo/bancho.py/.venv/lib/python3.9/site-packages/aiomysql/connection.py", line 973, in caching_sha2_password_auth
    data = _auth.sha2_rsa_encrypt(
  File "/home/lokillo/bancho.py/.venv/lib/python3.9/site-packages/pymysql/_auth.py", line 143, in sha2_rsa_encrypt
    raise RuntimeError(
RuntimeError: 'cryptography' package is required for sha256_password or caching_sha2_password auth methods

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

Traceback (most recent call last):
  File "/home/lokillo/bancho.py/.venv/lib/python3.9/site-packages/starlette/routing.py", line 671, in lifespan
    async with self.lifespan_context(app):
  File "/home/lokillo/bancho.py/.venv/lib/python3.9/site-packages/starlette/routing.py", line 566, in __aenter__
    await self._router.startup()
  File "/home/lokillo/bancho.py/.venv/lib/python3.9/site-packages/starlette/routing.py", line 648, in startup
    await handler()
  File "/home/lokillo/bancho.py/app/api/init_api.py", line 131, in on_startup
    await app.state.services.database.connect()
  File "/home/lokillo/bancho.py/.venv/lib/python3.9/site-packages/databases/core.py", line 82, in connect
    await self._backend.connect()
  File "/home/lokillo/bancho.py/.venv/lib/python3.9/site-packages/databases/backends/mysql.py", line 66, in connect
    self._pool = await aiomysql.create_pool(
  File "/home/lokillo/bancho.py/.venv/lib/python3.9/site-packages/aiomysql/pool.py", line 29, in _create_pool
    await pool._fill_free_pool(False)
  File "/home/lokillo/bancho.py/.venv/lib/python3.9/site-packages/aiomysql/pool.py", line 182, in _fill_free_pool
    conn = await connect(echo=self._echo, loop=self._loop,
  File "/home/lokillo/bancho.py/.venv/lib/python3.9/site-packages/aiomysql/connection.py", line 75, in _connect
    await conn._connect()
  File "/home/lokillo/bancho.py/.venv/lib/python3.9/site-packages/aiomysql/connection.py", line 558, in _connect
    raise OperationalError(2003,
pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'localhost'")

ERROR:    Application startup failed. Exiting.
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f570d702c10>
make: *** [Makefile:30: run] Error 3
lokillo@PC-GAMER:~/bancho.py$

Additional context
No response

that just means mysql isnt on doesnt it?
try doing sudo service mysql start

real error is the RuntimeError: 'cryptography' package is required for sha256_password or caching_sha2_password auth methods

this is a bug - i'll fix it soon - basically you need to add cryptography = "*" to project requirements, and then reinstall dependencies


Added a support of adding a UITextField to the alert controller.

+1

This weekend I will look at this pull request.

Sorry @Codeido , what about this pull request?

Hi @owlcoding, thanks for this pull request and sorry for the delay.
I reviewed the pull request, and the principle around the implementation is ok, but there are some problems. For example, when i select a text field and the keyboard appear, the text field go under the keyboard. In this way, i can't close the keyboard and i can't see what i wrote on the textfield.
If you implement this part, i can merge your pull request ;)

Merged. Thanks to @klauslanza for the fix. https://github.com/Codeido/PMAlertController/pull/34

Thanks @Codeido and thanks to @fedmeloni for the kickstart :-)


Incompatible with JourneyMap

Forge Version: 38.0.16
Flywheel Version: 0.4.0
JourneyMap Version: 5.8.0 alpha 9
When I disabled Flywheel Renderer and remaped by delete map:

When I Enabled Flywheel Renderer and remaped by delete map:

Mod List:

I am the Journeymap dev,
I noticed some weird issues with flywheel when doing some testing. I have not done much for debugging the issue yet.
We read chunks from disk for automapping them, I get a lot of these errors.
Chunk file at [-136, 65] is in the wrong location; relocating. (Expected [-136, 65], got [0, 0])
This error comes from
net.minecraft.world.level.chunk.storage.ChunkSerializer#read  line#72.
When I get time and get flywheel loaded up indev I will add more details.

I can't seem to reproduce this, even outside of dev

I do have the exact same Issue. I am running a Forge 1.18.1 - 39.0.5 Server with Flywheel + Create + Journeymap(5.8.0alpha9) and the exact same problems arise to me and my friends playing on the Server. I can even reproduce this by loading up a single player world. Same Issue

With just create and Journeymap, there seems to be an issue with the Flywheel renderer when we use texSubImage2D.
GL Error in method: texSubImage2D ERROR: 1282 (SUPPRESSED)
OpenGL Error in texSubImage2D target:3553, level:0, xoffset:192, yoffset:128, width:16, height:16, format:32993, type:33639, IntBuffer

Though, now that I added optifine the big black squares no longer happen.

Fixed in journeymap 5.8.0 beta4, should be on curseforge shortly.


Inaccurate information: The explicit pattern 'E' will print only 'Tue' instead of 'Tuesday'

The table shows explicit patterns in DateFormat Class's documentation on https://api.flutter.dev/flutter/intl/DateFormat-class.html seems inaccurate.
According to the table DateFormat('E').format(DateTime.now()) will return a full word of the day name. for eg. Tuesday
But When I try it in my code, it returns the short name of the day Tue
This is the reference to documentation:
https://github.com/dart-lang/intl/blob/3d12bf16b87208d879ba31cc3961f5c1cf42b810/lib/src/intl/date_format.dart#L163
Is this correct behaviour or should I update this documentation?

@timsneath @kevmoo
The documentation for the formatter has been inconsistent for a while. Can you try to point this me to right person who can validate and move this issue and PR forward?
import 'package:intl/intl.dart';

void main(){
  //Documentaion says then this produces "Monday" but actually it returns "Mon"
  final date = DateTime.now();
  final formatter = DateFormat('E');
  print(formatter.format(date));
}


Fails during save_step when using background step on cucumber 1.3.19

Using a background step now calls a different method (in Cucumber 1.3.9) so a lot of the instance variables aren't initialized (it used to call before_feature_element).
Need to make sure all variables are initialized when the scenario is running, even if using background steps

fixed in v1.1.0


fix: full node tests

Bug in detect_overlap_transactions was serious because it actually corrupted the memory since we were writing outside of the range of nonces ovject since instead of being initialized with size nodes.size() and values 1, it was actually initialized with array with two values: nodes.size() and 1
Other changes are just ensuring nonce ordering in the tests

prnet cleaned-up successfully


Is redux conflating actions with events?

I'm very new to redux, so bear with me.
I have some background in event sourcing, and the way it works is similar to redux, but not quite the same. In redux (or Flux in general), there is the concept of an action, that presuambly represents some intent either by the user or the system. There is also the concept of a reducer that responds to those actions by applying each one to the current state to generate a new state.
 state +---> +---------+
             | reducer | +---> state
action +---> +---------+

However, in event sourcing (ES for short), the concept of an action is distinct from the concept of an event. The typical pattern in ES is that there is an apply function that derives new state from an existing state and an event. So apply is equivalent to a reducer in redux. However, apply relies on a series of events to derive new state, not actions. Actions, on the other hand, are executed by an execute function, which takes the current state and an action, and produces zero or more events. (A good example can be found here, scroll to the Aggregate Module section.)
 state +---> +---------+
             |  exec   | +---> [event]
action +---> +---------+

 state +---> +---------+
             |  apply  | +---> state
 event +---> +---------+

This separation between actions and events is fundamental to wrapping one's head around intentions (actions) to change state, and facts (events) that need to be reconciled into state due to the fact that those intentions were actually carried out.
By conflating the two together, it causes artifacts like creating async actions and async middlewares, while it would be much easier to always keep actions as plain objects, and create async action handlers instead.
In addition, async actions/middlewares tend to produce other actions in response to the original action. The way I look at it, those async actions/middlewares should produce events, not actions, as a result of executing the original action. Those events will then be reconciled by the reducer in the typical manner. This is a much easier to understand pattern.
Middlewares are supposed to implement cross-cutting concerns, like logging or security, not application logic such as action handling.
Obviously I may be a bit biased towards ES, but I'd love to hear your opinion about what it has to offer.

We went with what's familiar to the target audience. The original target audience of Redux were Flux developers, so we considered it important to keep the Flux meaning of “action”.
This has been discussed before.
https://github.com/rackt/redux/issues/384
https://github.com/rackt/redux/issues/377
https://github.com/rackt/redux/issues/351

Thakns @gaearon. My apology for not going through the existing issues first.
I'm at least glad that I'm not the only one that sees the benefit of an alternative model, even though a decision has been made to keep things the way they are.

Isn’t the separation between action creators and actions in Flux/Redux more akin to the separation between actions and events in event sourcing?

@BurntCaramel Not quite. In CQRS / Event Sourcing, actions (more commonly known as commands) are intended for action handlers (or command handlers), which know how to handle specific actions, and produce events as a result. Events are intended for persistence of state deltas, and for reconstructing state from a series of events.
In redux, there is no distinction between actions and events. They all go through the same path (the middleware pipeline), and eventually they hit the reducers. It's up to you to assign specific semantics to those actions. In some cases actions will be intended for thunk/promise middleware to perform async actions, and those never hit the reducers. Other times actions are pure objects, and eventually hit the reducers. And even in the latter case, redux doesn't prescribe whether those objects that hit the reducers are commands or events. It's up to the application to make that distinction.
While this un-opinionated part of redux may be liberating for some people, I (and I guess some other people as well) find that it doesn't fit my mental model of having a clear distinction between commands that are intended for executing business logic, and events that are intended for persisting and reconstructing state.

@khaledh I used to share many of your thoughts some time ago.
Also some things I posted initially to the DDD user group
I'm a backend guy that knows (mostly in theory) ES / CQRS / DDD, and I've implemented some of the concepts in our startup framework nearly 2 years ago (see details).
In the framework I build, there are commands and events. A command handler transform the command to events. There are also sagas.
It works fine until now, the app runs in production for quite a while, but actually for a long time i felt like i needed a lot of boilerplate for what i wanted to achieve.
The thing is that when we transpose these backend concepts to the frontend world, there are some adaptations to be done because the context is different.
In backend DDD / CQRS, the commands are actually representing the user intent. The command handler / AggregateRoot can choose to refuse to execute that command. When an application UX is well-designed, this generally happens when there's a concurrency issue: otherwise it would not be really good UX to display a button to the user for a forbidden action. The role of the aggregate root is to maintain consistency in a collaborative domain. Note that concurrency issues happen because of the async nature of network communications: the UI the user uses to emit its intent may eventually be stale.
In frontend / Flux, the UI is synchronous, and the user intents are sent "serially" to the app. There's no such thing as "collaboration" on the UI so there's no need to make any AggregateRoot to maintain consistency. The UI is synchronized to the UI state (with React) and when the user emit its intent, that intent is thus never stale (relative to the UI state, but it may relative to the backend state).
When an user clicks on a button on the UI, the intent may be refused by the backend, but it is never refused by the frontend, as the frontend still take action to try to serve the user intent. In any case, even if the command is rejected by the backend, you are still giving an error user feedback in your UI. This means that the UI state is modified, and so the command was accepted to produce error events.
The thing to understand is that the DDD domain you have on the backend is very different from the DDD domain you would use in the frontend.
Where I want to go is that after a while using commands and events in a 2 years old production React app, I have never encountered any usecase where a command is rejected. Even when the intent is refused by the backend, it generates some kind of event to provide user feedback.
So, for me the frontend, due to its synchronous nature, does not reject any command. Thus there is no need for AggregateRoot, and the command handlers always accept the commands and translate them to events (even for failure feedbacks, because it's still UI state modifications).
With that in mind, if you rename CommandHandler to ActionCreator, and Event to Action, you have Flux.
And a Saga could just be a Store/reducer that receive events and trigger an ActionCreator.
You might argue that sometimes the command handler needs to be stateful to decide which events to emit. I agree with that but actually in most cases you can provide that data to your React component as well, and fire the appropriate ActionCreator.
Again I'm still using commands and events and it works fine, but it really is a lot of boilerplate (maintaining commands, events and command handlers, where there seem to be a one-to-one relationship with all those...).

My 2 cents follow.
Event Sourcing model:
 state +---> +---------+
             |  exec   | +---> [ event ]
action +---> +---------+

 state +---> +---------+
             |  apply  | +---> state
 event +---> +---------+

Facebook Flux model:
                  state +---> +---------------+                   // - via SomeStore.getState()
                              | ActionCreator | +---> [ action ]  // - via Dispatcher.dispatch({})
ActionCreator arguments +---> +---------------+

                  state +---> +---------------+
                              |     Store     | +---> state
                 action +---> +---------------+

Redux model:
                  state +---> +---------------+                   // - via thunk/getState()
                              | ActionCreator | +---> [ action ]  // - one via return {},
ActionCreator arguments +---> +---------------+                   //   many via thunk/dispatch({})

                  state +---> +---------------+
                              |    Reducer    | +---> state
                 action +---> +---------------+

Personally, I see no significant difference except the terminology.

@sompylasar That's a nice summary I think and is also aligned with how I see it.
I do think it is a little bit unfortunate that action has been settled in flux and redux, I understand why the choose it in redux to make it easier for the broader audience that understand flux to also understand redux. Using event instead of action would, in my mind, make much more sense. The reasoning is simple: an action is something you do and an event is something that has happened. In the redux scenario I see the reducer as a action creators as action handlers, action as events and reducers as projection function create a view (the state).

@mastoj Yes, same thing. Please re-read and fix the words in your comment though to avoid eben more confusion:

In the redux scenario I see the reducer as a action creators as action handlers, action as events and reducers as projection function create a view (the state).


Able to snip a segment of a recording for download

Description
Able to snip a segment of a recording for download
Proposed Solutions
Allow region by importing media fragment spec (SMPTE) into Media API.
Additional Background
Level 3 (unless implemented in client).
identifier/t1,t2&xywh/size/?/default.avi
Source: BL workshop notes

This, to me, is the actual AV API, rather than just HTTP.

So this is about download of segments and not playback? To support download of segments similar to the Image API it would require downloading just media fragment (time and xywh). Does anyone know of an existing server that can do this? How feasible is it to create such a segment for download within the request-response cycle? It seems that video manipulation like this is usually the kind of thing that is done asynchronously in a background process.
Does this need to support any arbitrary segment and region of media at the moment a user requests it or only those that are advertised through an info.json or manifest as having been pre-created?

So ... pre-configured snippets could be built ahead of time, as per sizes in the Image API.
Should be forwards compatible to a time when we can do it, the same way that level 0 implementation of sizes and tiles is forwards compatible to having dynamic extraction from the image.


PHP 8.4 support

Before tagging 1.0, we need to upgrade to 8.4. The main feature to add are property hooks on interfaces.

I've run a check on this and it won't be hard to update everything in the repo, but we have quite a few dependencies holding us back on this.


stdlib: Improve String comparison performance

This patch attempts to recover some of the performance lost on Linux due to https://github.com/apple/swift/commit/ef974af339996f63c72d54ec7ef53b625e5a1a76. A more detailed description is provided in the commit message, but the short summary is that we can use a memcmp-like approach to compare the binary representations of two strings until we hit a difference, after which we can fall back to the more expensive ICU routines. A memcmp-like routine, written in C, is provided which does a modest job of optimizing the comparison by comparing uintptr_t-sized blocks at a time when possible.
The performance lost due to https://github.com/apple/swift/commit/ef974af339996f63c72d54ec7ef53b625e5a1a76 strongly depends on which version of ICU Swift is built against; versions of ICU prior to ICU 53 are particularly bad when dealing with ASCII strings so in those environments https://github.com/apple/swift/commit/ef974af339996f63c72d54ec7ef53b625e5a1a76 is particularly costly. I've tested on both Ubuntu 14.04 (with ICU 52) and Ubuntu 16.04 (with ICU 55) with a simple micro-benchmark @djones6 came up with that tests various scenarios; results are as follows:
Ubuntu 16.04

Test
Swift 3.1
Swift 3.1+patch
3.1 / 3.1+patch

ASCII lexically equal, binary equal
439.02
26
16.89

ASCII lexically not equal, same length
491.1
149.80
3.28

ASCII lexically not equal, different lengths
496.91
148.91
3.34

UTF16 lexically equal, binary equal
35.84
27.43
1.31

UTF16 lexically equal, binary not equal, same length
267.98
232.45
1.15

UTF16 lexically not equal, same length
265.44
227.90
1.16

Ubuntu 14.04

Test
Swift 3.1
Swift 3.1+patch
3.1 / 3.1+patch

ASCII lexically equal, binary equal
8418.33
19.79
425.31

ASCII lexically not equal, same length
8038.33
400.19
20.07

ASCII lexically not equal, different lengths
8037.67
399.96
20.10

UTF16 lexically equal, binary equal
22.25
21.38
1.04

UTF16 lexically equal, binary not equal, same length
224.21
175.08
1.28

UTF16 lexically not equal, same length
220.91
171.83
1.29

(Measurements are elapsed time in seconds for 1 million comparisons)
I'm in the process of re-writing this micro-benchmark to conform to the conventions used in swift/benchmarks (as suggested by @dabrahams) however it seems that benchmarking is not supported on Linux and requires more than a few changes to the build system to get working so in the interest of getting early feedback on this patch itself I put together this PR. Any feedback would be appreciated.

@swift-ci Please test

/cc @dabrahams

@swift-ci Please test Linux platform

@ymanton One thing that we have discussed is switching the benchmark suite to build using swiftpm. I may have a patch around that does this. It would enable this to be built on Linux with some small modifications. Interested?

@gottesmm Sure, that would be helpful.

Is this correct? "abcdèfg" and "abcdëfg" have a common byte prefix of "abcde" (when in decomposed form, anyway), but would comparing starting with the combining character produce a different result than comparing starting with the base character?

@ymanton Could you please write and executes a test case that answers @jrose-apple's question?  Thanks

/cc @milseman

would comparing starting with the combining character produce a different result than comparing starting with the base character?

I put together a quick test that takes every composed character that is formed by the cross product of [a-zA-Z] x [U+0300-U+036F] (i.e. pairing every latin alphabetical character with every combining diacritical mark) and in the middle of "abcd" and "ef", then I compared every one of those strings against every other, both for equality and order -- the results were identical with and without this patch.
I can't claim to be a Unicode expert, and my attempts at reading through the Unicode Collation Algorithm spec in the hopes of finding statements that says this is legitimate have yet to succeed, but it seems to pass the sniff test anyway. I'll try to come up with something more thorough, perhaps utilizing the UCA conformance tests.
Having said that, here are some alternatives that come to mind:

On hitting a mismatch we can always restart ICU collation from offset 0, but this would make all unequal string comparisons slower than they are right now.
We could check if the mismatch involves simple characters (e.g. in the ASCII range) and only start ICU collation off at the mismatch offset in those cases. This would penalize a smaller subset of unequal string comparisons.
The inverse of the above would be checking if the mismatch involves combining or modifying characters only restarting ICU collation at offset 0 in those cases.
We could backtrack if the mismatch involves combining or modifying characters and find the first standalone character in order to restart ICU collation at that position. The backtracking itself might be fairly expensive in terms of tests per character, but I imagine in most cases you'd be backtracking past a small number of characters.

The Collation algorithm TR has this under "What Collation Is Not":

Collation order is not preserved under concatenation or substring operations, in general.
For example, the fact that x is less than y does not mean that x + z is less than y + z, because characters may form contractions across the substring or concatenation boundaries. In summary:

x < y does not imply that xz < yz
x < y does not imply that zx < zy
xz < yz does not imply that x < y
zx < zy does not imply that x < y

However, it's unclear whether this applies to non-localized collations. Further down, under "Default Unicode Collation Element Table":

In the Default Unicode Collation Element Table, contractions are necessary where a canonical decomposable character requires a distinct primary weight in the table, so that the canonical-equivalent character sequences are given the same weights. For example, Indic two-part vowels have primary weights as units, and their canonical-equivalent sequence of vowel parts must be given the same primary weight by means of a contraction entry in the table. The same applies to a number of precomposed Cyrillic characters with diacritic marks and to a small number of Arabic letters with madda or hamza marks.

The Default Unicode Collation Element Table is constructed to be consistent with the Unicode Normalization algorithm, and to respect the Unicode character properties. It is not, however, merely algorithmically derivable based on considerations of canonical equivalence and an inspection of character properties, because the assignment of levels also takes into account characteristics of particular scripts. For example, the combining marks generally have secondary collation elements; however, the Indic combining vowels are given non-zero Level 1 weights, because they are as significant in sorting as the consonants.

The simplest example where this would go wrong in a localized comparison is "abcde" vs. "abche" in Spanish locales, where "ch" is treated as a single ~letter~ collation element. It's a little unclear to me whether we'd be allowed to tailor the default table in such a way that we use no "contractions" to avoid this problem, and then secondarily unclear whether that would be desirable.
The mitigation of only doing this for ASCII mismatches is probably good enough, but someone would need to double-check that none of the multi-character collation element mappings in the default table have non-initial ASCII characters. I think that would be a sufficient condition but you or @dabrahams should probably check my reading.
I like the idea of having a little Swift program that can run through the UCA conformance tests. We could even add that to our validation tests.

Ah, by the way, please don't take my comments as dismissal or disrespect. I/We definitely appreciate you coming in with a patch to improve things. :-)

Ah, one workflow note: we usually take patches to the master branch first, and then cherry-pick them to the release branch after we've seen that there are no issues.

Per the string manifesto, we really don't want to be using the UCA for non-localized comparisons anyway. However, the exact semantics of string compArison are most likely going to be changing soon And we should only change them once. Michael is working in this area. Michael, will you be able to use anything from this patch?
Sent from my moss-covered three-handled family gradunza

On Feb 8, 2017, at 5:44 PM, Jordan Rose<EMAIL_ADDRESS>wrote:
Is this correct? "abcdèfg" and "abcdëfg" have a common byte prefix of "abcde" (when in decomposed form, anyway), but would comparing starting with the combining character produce a different result than comparing starting with the base character?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

I am working on the comparison algorithm and semantics for String in Swift 4. However, if there is a semantics-preserving optimization, such as this PR, we should take it.
My main concern with this PR, because I am not a Unicode expert, is whether returning the offset of the first code unit difference is correct. I believe that returning the offset of the code unit that began the new grapheme would be. The tight loop could be adjusted to remember the offset of the last non-combining character and return that instead.
@ymanton, does this PR exhibit different behavior if the compared strings are canonicalized differently? That is, if their normal forms differ or they are not even in a normal form?  That is, if their normal forms differ or they are not even in a normal form? To use the collation TR's example, do strings containing the following equivalent graphemes compare equivalently no matter how they are expressed?

The given examples all compare equally to one another. Only two of the five exercise this PR. ự, ụ ◌̛ and ư ◌̣ all have unique leading code points so the UCA is used right off the bat. Only u ◌̛ ◌̣ and u ◌̣ ◌̛ are interesting here and for these two the first code point matches via memcmp and the remaining code points are passed on to the UCA where ◌̛ ◌̣ and ◌̣ ◌̛  come out equal as well, as expected.

Ah, the case I was most worried about was actually not equality but preserving < when normal forms differ and we're breaking in the middle of a grapheme.
For example, is there some x``y``z``w such that:
UCA states that xyw < xzw, but either z < y or zw < 'yw'.
In the case of z < y, if the strings are presented as xwy and xwz, then UCA breaking at the z and y would result in a different sort order than the whole grapheme.
In the case of zw < yw, if the strings are presented as xyw and xzw, then UCA breaking at the yw and zw would result in a different sort order than the whole grapheme.
x``y``z and w above need not be confined to only unicode code points, but might be arbitrary sequences of code points while still inside a grapheme.
If so, then breaking comparison at the z would produce the wrong sort order.

@swift-ci please test

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - f2c21d34b164f8d146f37225ebbda07b01ef57b7
Test requested by - @ematejska

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - f2c21d34b164f8d146f37225ebbda07b01ef57b7
Test requested by - @ematejska

@swift-ci clean test

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - f2c21d34b164f8d146f37225ebbda07b01ef57b7
Test requested by - @tkremenek

Fixed the OS X build break.

@swift-ci test

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - f2c21d34b164f8d146f37225ebbda07b01ef57b7
Test requested by - @tkremenek

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - f2c21d34b164f8d146f37225ebbda07b01ef57b7
Test requested by - @tkremenek

@milseman, I think we are safe on this point for most cases, particularly for combining characters, because grapheme sort keys are in most cases composed via concatenation. The code points x, y, z, y have sort keys k(x), k(y), k(z), k(w). The grapheme clusters xyw and xzw have the sort keys k(x)+k(y)+k(w) and k(x)+k(z)+k(w) respectively -- i.e. the grapheme cluster's sort key is the concatenation of the code point sort keys. This is a bit of a simplification as UCA sorting is weighted, but I think the end result is the same none the less.
For xyw < xzw to be true k(y) < k(z) has to be true, since the other two keys and their relative positions are the same, which means that z < y or zw < yw cannot be true.
The one place where we can run into problems is with contractions, as @jrose-apple mentioned a while back. This is where the characters ch form a single collation element who's sort key k(ch) is not a combination of the individual characters' sort keys k(c) and k(h). For this grapheme cluster we will indeed get different results if we invoke UCA in the middle of the grapheme. Unfortunately, such contractions are not limited to localized sorting, as the DUCET contains many such contractions. To deal with this we can explore some of the earlier suggestions that came up as the workaround is effectively the same, we want to avoid invoking the UCA in the middle of a contraction.

Sent from my moss-covered three-handled family gradunza

On Feb 14, 2017, at 9:23 AM, Michael Ilseman<EMAIL_ADDRESS>wrote:
Ah, the case I was most worried about was actually not equality but preserving < when normal forms differ and we're breaking in the middle of a grapheme.
For example, is there some xyz``w such that:
UCA states that xyw < xzw, but either z < y or zw < 'yw'.
In the case of z < y, if the strings are presented as xwy and xwz, then UCA breaking at the z and y would result in a different sort order than the whole grapheme.
In the case of zw < yw, if the strings are presented as xyw and xzw, then UCA breaking at the yw and zw would result in a different sort order than the whole grapheme.
xyz and w above need not be confined to only unicode code points, but might be arbitrary sequences of code points while still inside a grapheme.
If so, then breaking comparison at the z would produce the wrong sort order.

You don't need to actually find such an example to prove there is a problem; it is sufficient that the UCA plus the kinds of things expressible by  collation tables are able to produce such a result, and IIUC, they are.

I went ahead and put together a test case that runs through the appropriate UCA conformance test (for variable weighting set to non-ignorable). Once I was satisfied that the test was correct and that current Swift 3.1 passed all 145996 comparisons I ran it again with this PR. This uncovered a few hundred failures caused by surrogate code points. In the discussion up to this point I had forgotten that we'd be dealing with UTF16 encoded strings and that surrogates would come into play, but that's a relatively easy problem to deal with. Excluding failures involving surrogates we had 14 failures, all involving contractions and failing as expected.
So in order to properly order contractions and surrogate pairs we can't invoke the UCA with UTF16 strings that start in the middle of a contraction or surrogate pair. Rather than carry out a lot of expensive operations to figure out if we're in the middle of a contraction or surrogate pair, we simply step back a fixed number of code units, equal to the longest possible contraction, or the length of a surrogate pair (2), whichever is greater, minus 1 (while taking care that we don't step back past the start of the strings). This should produce a correct result at the cost of re-comparing a few characters that we know are equal, which is likely much cheaper than calculating a more precise number of code units to step back.
In order to facilitate this I added a new routine to find the longest possible contraction defined by the root collator and cached its length in a static global. The search should therefore only be performed once-ish however there is no synchronization here to guarantee that. I believe the routine is thread-safe and idempotent and should produce the same results even if more than one thread manages to sneak in during the initialization window, nevertheless I'd welcome more scrutiny on this or any other part of the patch.
With the above this PR passes the conformance test cleanly.
(Side note: I tried writing the conformance test in the form of a test case should we want it to be part of the regression suite, however it uses Foundation to parse the input file and Foundation seems to be unavailable to test cases on Linux (?), so for now it's a standalone program.)

For those interested in the details, the longest contraction comes out to be 4 UTF16 code units, so we have to re-compare 3 characters on mismatch. Alternatively, there are 826 contractions in the default table, so calculating a more exact value to step back for would involve figuring out which of these 826 contractions you might be in the middle of, if any. It's likely that even the most clever algorithm will cost more than re-comparing 4 characters so I didn't entertain this idea any further.

@swift-ci test

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - ad82190bafda48a0fa6790bd6881183da0fe7e71
Test requested by - @tkremenek

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - ad82190bafda48a0fa6790bd6881183da0fe7e71
Test requested by - @tkremenek

Hi @ymanton – it looks like this isn't building for OS X still, and also needs a bit more discussion and alignment with the changes @milseman is planning on making for the Swift 4 string comparison, so is probably getting late for 3.1. Do you think you could rebase the PR onto master? Generally, all changes should be done on master, and then cherry-picked onto a release branch if needed.

Do you think you could rebase the PR onto master?

Will do. I've gotten access to an OS X machine finally so I'll rebase on master and make sure it builds and runs cleanly everywhere in short order.
(On a side note, it would be nice to get this into 3.1 if possible. The performance we can recover, particularly for ASCII and especially on Ubuntu 14.04, would put Swift 3.1 in a better place until Swift 4 lands in my humble opinion.)

Rebased against master and fixed the OS X issues.

I modified the conformance test to run without Foundation on Linux, but unfortunately (independent of this PR) I don't think it will make a good test case. First, you need to use the input file that was packaged with the ICU source of the version of ICU you're building against; that's the only input that seems to have any hope of passing the test. (For example, on Ubuntu 16.04 with ICU 55 only the input file from ICU 55 passes. Input from ICU 52 and 58 both fail.) This is because the input file changes to account for bug fixes and changes in the default collation table. Second, even a matching input file is not guaranteed to pass, again because of bugs. (For example, on 14.04 with ICU 52 even the input file from ICU 52 fails.) The conformance test included with ICU contains code to check for and ignore expected failures.
In short, I think this test is only useful when run manually, against a corresponding input file the user manually retrieves, and only to do before/after testing to see how the number of failures changes. Anyhow, here's the code for anyone who finds it useful in the future.
https://gist.github.com/ymanton/78cc08d805b6e6db65dbed6d43a6eb4a

Any comment? Can I bug someone to run the regression tests?

@swift-ci please test

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 7a8ba2dfd51e887dd520ddedfbd8d3b8b05a8e5b
Test requested by - @CodaFi

The SIL thing isn't yours.

What's the next step here - does another build need to be requested?

@swift-ci please test Linux platform

Ping :hand:

@airspeedswift while we will probably change and unify the sort order semantics for String in Swift 4, do you want to take a change like this for Linux in Swift 3?

Any decision on this?

@airspeedswift ping?
While we will probably change and unify the sort order semantics for String in Swift 4, do you want to take a change like this for Linux in Swift 3? Alternatively, would a modified approach (such as mentioned earlier in this thread) be acceptable?

This patch has fallen behind, still doesn't have tests, and may not make sense given the new string model.  Is it still worthwhile to have?  Should it be closed until we can figure out a more comprehensive fix later?
@milseman @airspeedswift

Build failed
Swift Test Linux Platform
Git Sha - 7a8ba2dfd51e887dd520ddedfbd8d3b8b05a8e5b

(Oh hai Swift-ci)

Build failed
Swift Test OS X Platform
Git Sha - 7a8ba2dfd51e887dd520ddedfbd8d3b8b05a8e5b

Going to close this due to age.  Please feel free to reopen it @ymanton.


Error when submitting transaction on API Versions 2017-08-01 or 2018-02-08

Calling PurchaseShippingLabel(transactionInput) results in the following error when using a client on latest API Version (2018-02-08):
Error executing request: Error unmarshaling response data: json: cannot unmarshal string into Go struct field Transaction.tracking_status of type models.TrackingStatusDict: errorString
I believe this is most likely due to the update to the API Version 2017-08-01:
"Transactions
The tracking_history field has been deprecated from the Transactions object. The Transactions object will still have the most recent tracking_status on it, but to get a full tracking history, you would need to subscribe a webhook to the tracking_update event or query the Tracks endpoint."

Any progress on this?


Add operation meta data custom meta data

Added optional metadata collection called CustomMetaData to allow custom data for the OperationMetaData class.

App harbor build: y u no work?