[FLINK-4410] Expose more fine grained checkpoint statistics

This PR exposes more fine grained checkpoint statistics. The previous version of the tracking code had a couple of short comings:

Only completed checkpoints were tracked in the history. You did not see in progress or failed checkpoints.
Only the latest completed checkpoint had more fine grained stats per operator and sub tasks. This meant that a possibly interesting checkpoint statistics could be live updated as you was looking at it.
Many newly tracked statistics like checkpoint duration at the operator or alignment duration were not exposed.

This PR addresses these issues. For the extended tracking of the life cycle I decided to add tracking callbacks of all relevant entities like PendingCheckpointStats, CompletedCheckpointStats, SubtaskStateStats, TaskStateStats, etc. The life cycle of these objects follows that of their corresponding entities.
Furtheremore, this add new REST API handlers that work with the new tracker and also new layout for displaying them.

Some screenshots:
Clicking on the Checkpoints Tab: Sub tabs for overview, history, summary stats, and the config.

Clicking on the History Tab: Lists recent checkpoints, including in progress ones.

Clicking on details for a checkpoint:

After triggering a savepoint:

Details for the triggered savepoint:

Failed checkpoint while cancelling job:

Clicking on the config tab:

After restoring from the savepoint:

Wow, this looks awesome, great work.
Small note: In screenshot 2, it says "End to Duration", which should probably be "End to End Duration".
Is there also a column that shows the synchronous and asynchronous parts of the checkpointing time?

I think what would put a cherry on top is if we can break the "End To End Duration" down into

Delay till triggering (how long until all barriers were there)
Synchronous checkpoint time
Asynchronous checkpoint time

That would help big time, as many users currently get confused when checkpoints have long async times, assuming that the computation halts for that time.

Hey Stephan! Thanks for spotting the typo. The numbers are already reported but I forgot to attach the screenshot. They are only reported for each operator/task though, because I'm not sure what would be the best way to summarize those numbers as simply displaying the sum or maximum as the checkpoint alignment duration, sync/async checkpoint duration does not work well imo.

These numbers you get for all tracked checkpoints.

Okay, super. The 'time to triggering' is then end_to_end_time - sync_time - async_time?

Sorry for the long delay here. We can add that number as a separate column Triggering Delay. What do you think? As a follow up I would also like to add documentation about what all the numbers mean.

I think a triggering delay would be very nice and helpful.
We can do this as a next step, separate from this pull request.

Very nice change!
I would love to merge it to 1.2 as well, its so helpful!
One very minor thing: I would suggest to round the percentages shown for the completion. I had an instance where it was showing a progress of 51.000000001%.
Here's a screenshot from my testing job:

Thanks for checking it out Robert. Would love to merge it for 1.2 as well. I fixed the rounding issue.

+1 to merge


feat(graphql_analyze): add suppression action for the GraphQL linter

Summary
Add a suppression action for the GraphQL linter, as it is required for the analyzer to be deemed stable.
Close https://github.com/biomejs/biome/issues/4148
Test Plan
Added new tests that show how the the linter emits suppression action.
Notes
I can rebase this onto https://github.com/biomejs/biome/pull/4306 if we don't need to release this soon.

Done!

Thank you. We'll merge once we are finished with bug fixes


try_parse with std::string_view

Is there a reason why try_parse or parse in general doesn't work with std::string_view?
As far as i know are std::string_views's supported as values or am i missing some hint in the docs?
Thanks in advance

So I've looked a bit into your code for that and it could be as simple as wrapping the code into a string which would be okay but doesn't really fit with the string_view philosophy imo. To make use of the string_view some more changes need to be done and i don't know if this is something you allow as a pr or you are already working on that.
best regards


jax.config.update('jax_platforms', 'gpu') fails

Description
import jax
jax.config.update('jax_platforms', 'gpu')
jax.default_backend()

returns
RuntimeError: Unable to initialize backend 'rocm': NOT_FOUND: Could not find registered platform with name: "rocm". Available platform names are: Interpreter CUDA Host

On the other hand,
import jax
jax.default_backend()

succeeds and returns gpu.
What jax/jaxlib version are you using?
jax 0.3.14, jaxlib 0.3.14
Which accelerator(s) are you using?
GPU
Additional System Info
V100 GPU,  Driver Version: 470.57.02,  CUDA Version: 11.4

The naming is confusing, but I think what you want is:
jax.config.update('jax_platforms', 'cuda')

thanks -- that works. it'd be great to have this in the doc as well!


Question: What are the performance implications of having one store and what are the alternatives?

@mecid First of all I freaking love your blog and all the helpful content you create, so thanks for all of that! I only wish you had an RSS feed so I could get notified on each post.
I recently switched my own app to using a single store that's in an ObservableObject class (much like you do in this repo) but I've had to do all sorts tricks to make sure data changes to different parts of my store don't cause updates in unrelated views.
For a bit I thought this was the right answer: https://nalexn.github.io/swiftui-observableobject/
Eventually I ended up making my own manual ObservableObject wrapper that can wrap my store and filter but it's a bit messy. Now I am wondering if I should just have many ObservableObjects or even go back to MVVM.
Given your amazing swiftUI insights I was wondering what your take on these architecture questions are.

Hi @garsdle,

Hi @garsdle,
Thanks for your feedback, here is the RSS feed url http://swiftwithmajid.com/feed.xml
SwiftUI diffing is super fast and should not update the views that didn't change.

Also you can check the source code of the Store class. It has a projection method that can play the role of ViewModel to format your data.

@garsdle Also you can check the source code of the Store class. It has a projection method that can play the role of ViewModel to format your data.
https://github.com/SwiftRex/SwiftRex/blob/develop/Sources/SwiftRex/CoreTypes/Store/StoreType%2BProjection.swift

Awesome stuff, thanks for the quick reply. I subbed to the feed!
Just to make sure I understand, are you saying that your container view will update from any store update but it won't matter because swiftUI is fast enough to handle it? In effect you are kind of using the view itself as a filter for your store updates?

@garsdle even without container views, it should work very fast, but yes it plays the role of a filter. Container views allow you to reuse your views and make them Equatable to provide custom diffing.

@mecid  i don't think so
SwiftUI diffing is super fast and should not update the views that didn't change.
Here is the exampe: when we click the button, mainView is always re-rendered,  which is a potential performance impact.
struct MainView: View {
    @ObservedObject var store = AppStore()

    var body: some View {
        print("mainView")
        return Form {
            SubView(date: $store.date)
            Button("Press it") {
                self.store.date = Date().description
            }
        }
    }
}

struct SubView: View {
    @Binding var date: String
    var body: some View {
        print("subView")
        return Text(date)
    }
}

class AppStore:ObservableObject{
    @Published var date:String = Date().description
}

SwiftUI runs the body property to calculate the changes. It doesn’t mean it renders stuff every time. The body property returns the representation of the view and SwiftUI uses it to diff it with previous hierarchy. If something changes it renders changes.

@mecid I'm wondering if you still feel this way about body calculation? I remember we interacted a little at WWDC and you mention the idea of something akin to MVVM with passthrough.

@garsdle I'm still using this approach and it looks like a best way to build apps using SwiftUI at the moment.

Thanks for the update!


Simplify doc structure.

Remove the echoshader_doc folder to simplify the structure.

This is resolved by #161 one it is merged


Various dart fixes

This is bunch of minor things I've found as part of building the Dart services SDK.

This and a few other recent PRs across the org have been very difficult to review due to a huge amount of files changed solely for style / formatting reasons.
We should have a conversation to figure out a way to keep PRs sane when large formatting changes are at play.

Yup, in the future, this won't be such an issue. I've been working (very casually in okapi repo) to add coding style checkers. Since Dart isn't officially supported, I wasn't worried about style PRs yet. Also, this PR moves to using dart format.
opens can of worms about style guidelines


Bug: Incomplete results while a run is in progress

The /tests endpoint returns an incomplete result set when a test run is in progress.
Expected: Should just return the result set from the previous run while a new run is in progress

@anuragkapur are you still able to reproduce this?

I'll try and create a test that verifies if this is present or not.

I can reproduce this. Working on failing test and fix.

This is not an issue as proved by the test added here: https://github.com/atam4j/atam4j/pull/79


The default acl should private to to facilitate least privilege

The default acl is public-read as documented in https://github.com/funkybob/serverless-s3-deploy#acl. The default acl should be private for least privilege, especially with recent news events on public buckets in S3.

Secure by default is a good policy.
Thanks for the PRs.


Bulid failed with error message

Hello sir, I am getting this type of error when run command 'cordova run android'.

cordova version 7.1.0
Node version 8.9.1
Phonegap version 6.4.3

I have one plugin installed 'cordova-plugin-whitelist' with firebase plugin. Please help to solve this problem. Thanks in advance.
:processDebugResourcesinvalid resource directory name: C:\Users\joy2012bd\Deskto
p\Apps\firebaseapp\platforms\android\build\intermediates\res\merged\debug/values
-b+sr+Latn
FAILED
BUILD FAILED
Total time: 4.135 secs
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':processDebugResources'.

com.android.ide.common.process.ProcessException: Failed to execute aapt

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
Error: cmd: Command failed with exit code 1 Error output:
invalid resource directory name: C:\Users\joy2012bd\Desktop\Apps\firebaseapp\pla
tforms\android\build\intermediates\res\merged\debug/values-b+sr+Latn

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':processDebugResources'.

com.android.ide.common.process.ProcessException: Failed to execute aapt

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
Picked up _JAVA_OPTIONS: -Xmx512M

Got the same error. New Ionic project. Only thing added is this plugin.

How did you slove it? I removed & added the plugin again. But same problem.

@joy2012bd I uninstalled Android Studio, removed all references in environment variables (path etc). Installed newest version of AS, installed packaged and dev-tools. Checked paths, installed newest version of gradle. Took me two days, but now it's up and running

closing as resolved


Generated code does not compile if all fields are ignored

Describe the bug
There are some resources with very few fields, like KMS Alias, and we may end up adding all of their fields to the ignore list. However, since there are for loops running for resources like KMS Alias where the read function returns a list, the for loop ends up having empty content and since elem is not used, the code does not compile.
An example for loop generated is as following:
func GenerateAlias(resp *svcsdk.ListAliasesOutput) *svcapitypes.Alias {
	cr := &svcapitypes.Alias{}

	found := false
	for _, elem := range resp.Aliases {
		found = true
		break
	}
	if !found {
		return cr
	}

	return cr
}

Compiler does not accept having elem there as unused.
Steps to reproduce
Ignore all fields in KMS Alias resource and run the generator.
Expected outcome
I'd expected the code to compile.
Environment
KMS Alias.
Code Generator Commit: cac5654b7bb64c8f754ad9af01799ef70d9541b6

@muvaf Hi! So, in the case you highlighted here, if we did an throwaway assignment of elem to _ directly after the for loop, the code would compile but if there are multiple Aliases returned from the call to ListAliases, the cr returned would be an empty svcapitypes.Alias struct. Is that what you would want? Seems like buggy behaviour to me.

the code would compile but if there are multiple Aliases returned from the call to ListAliases, the cr returned would be an empty svcapitypes.Alias struct. Is that what you would want?

Yes, and that's because there is no field remained on the resource to set anyway. So, it's already bound to return an empty struct.
In our case, those fields are ignored because we needed special handling of them, hence moved them to CustomAliasParameters that is inlined in spec, so, we process that empty svcapitypes.Alias in another function called right after this one.

Hi @jaypipes, I encountered the same issue with Neptune DB Instance resource. Is there a solution/workaround you may suggest?
if resp.DBInstance.DBSecurityGroups != nil {
		f14 := []*string{}
		for _, f14iter := range resp.DBInstance.DBSecurityGroups {
			var f14elem string
			f14 = append(f14, &f14elem)
		}
		cr.Spec.ForProvider.DBSecurityGroups = f14
	} else {
		cr.Spec.ForProvider.DBSecurityGroups = nil
	}

Hi @jaypipes, I encountered the same issue with Neptune DB Instance resource. Is there a solution/workaround you may suggest?
if resp.DBInstance.DBSecurityGroups != nil {
		f14 := []*string{}
		for _, f14iter := range resp.DBInstance.DBSecurityGroups {
			var f14elem string
			f14 = append(f14, &f14elem)
		}
		cr.Spec.ForProvider.DBSecurityGroups = f14
	} else {
		cr.Spec.ForProvider.DBSecurityGroups = nil
	}

@ezgidemirel apologies for the super-late response on this :(
The above is likely not the same issue. If I were to guess, the Neptune API shares a lineage with the RDS API and the shape of the DBSecurityGroups field in the Create Input and Output shapes is a different type, which is what is leading to the above problem.
We solved this in the RDS controller using this block of YAML in the generator.yaml file

Thanks @jaypipes! I'll give it a try.

/remove-lifecycle stale

/reopen


I am facing this issue while using this lib, i am able to build the code but when i convert docs to pdf, one error i am getting. "Caused by: org.apache.xmlbeans.XmlException: error: The 'namespace-prefix' feature is not supported while the 'namespaces' feature is enabled."

Hi @naziyak,
Could you please help with the stack trace or mode details?


[FEATURE]Remove double converting from byte[] to float[], and float[] to byte[]  for script scoring with binary vector

In https://github.com/opensearch-project/k-NN/pull/1826 which support script scoring on knn binary vector, we convert byte[] to float[] and again float[] to byte[] which will add a latency during query using script scoring on knn binary vector. We want to avoid the unnecessary converting.

@heemin32 why we are not resolving this as part of 2.16 when this impacts the latency?

It is not a trivial change and 2.16 code freeze is just a next Monday. Score script is already slow compared to ANN and the impact on latency due to double converting could be negligible though actual profiling might be needed to confirm.

and the impact on latency due to double converting could be negligible

till we don't have benchmarks we cannot say this. and leaving optimization out of a release doesn't seem correct to me.

and the impact on latency due to double converting could be negligible

till we don't have benchmarks we cannot say this. and leaving optimization out of a release doesn't seem correct to me.

Optimization can be implemented incrementally. That is how it has been till now.

@kasundra07 is working on this.

You can assign this to me.

Details
Here, in KNNVectorDVLeafFieldData.java, we create KNNVectorScriptDocValues object and depending on the version of opensearch the index was created on, we either use LuceneKNNVectorsFormats - KNNByteVectorScriptDocValues for byte/binary vectors & KNNFloatVectorScriptDocValues for float vectors (OS version >= 2.17) or KNNNativeVectorScriptDocValues (OS version < 2.17).
static boolean useLuceneKNNVectorsFormat(final Version indexCreatedVersion) {
    return indexCreatedVersion.onOrAfter(Version.V_2_17_0);
}

So, for binary vectors, either KNNByteVectorScriptDocValues or KNNNativeVectorScriptDocValues will be used depending on the OS version on which the index was created.
For both these classes, we have doGetValue() method where we convert the underlying vector to float[] -
KNNByteVectorScriptDocValues -
protected float[] doGetValue() throws IOException {
    byte[] bytes = values.vectorValue();
    float[] value = new float[bytes.length];
    for (int i = 0; i < bytes.length; i++) {
        value[i] = (float) bytes[i];
    }
    return value;
}

KNNNativeVectorScriptDocValues -
protected float[] doGetValue() throws IOException {
    return getVectorDataType().getVectorFromBytesRef(values.binaryValue());
}

In VectorDataType.java -> BINARY

public float[] getVectorFromBytesRef(BytesRef binaryValue) {
    float[] vector = new float[binaryValue.length];
    int i = 0;
    int j = binaryValue.offset;

    while (i < binaryValue.length) {
        vector[i++] = binaryValue.bytes[j++];
    }
    return vector;
}

And for binary vector, script scoring is supported for hamming space type and here we convert the float[] back to byte[] for calculating hamming distance -
(float[] q, float[] v) -> 1 / (1 + KNNScoringUtil.calculateHammingBit(toByte(q), toByte(v)))

We want to avoid this double conversion, byte[] to float[] & float[] to byte[].
Solution
Currently Hamming class extends abstract class KNNFieldSpace which has getScoreScript() method that returns the scoring script for the query -
public ScoreScript getScoreScript(
    Map<String, Object> params,
    String field,
    SearchLookup lookup,
    LeafReaderContext ctx,
    IndexSearcher searcher
) throws IOException {
    return new KNNScoreScript.KNNVectorType(params, this.processedQuery, field, this.scoringMethod, lookup, ctx, searcher);
}

Here, processedQuery and scoringMethod are bound to float[] vectors -
private float[] processedQuery;
private BiFunction<float[], float[], Float> scoringMethod;

Since we need byte[] alternatives of these for Hamming, we can instead implement the interface KNNScoringSpace and have custom implementation of score script, KNNByteVectorType, dealing with byte[] vectors.
And within the execute() method of this new scoring script class (KNNByteVectorType), we can call getByteValue() instead of getValue() on KNNVectorScriptDocValues instance to fetch the byte[] vector and pass it to the scoring method.
So, both the classes mentioned earlier - KNNByteVectorScriptDocValues & KNNNativeVectorScriptDocValues, would have an additional method doGetByteValue() overridden which returns byte[] vector which would be used in the execute() method as explained above.
Results
Dataset used - http://corpus-texmex.irisa.fr/ (ANN_SIFT1M)Dimensions - 128Vectors - 1,000,000Got two indices - one created on OS 2.16 and another created on OS 2.18, and ran the script score query for 10k query vectors with and without the above mentioned changes for both these indices.

With default implementation
With the new changes
% change in total time

p50 (in ms)
p90 (in ms)
Total (in s)
p50 (in ms)
p90 (in ms)
Total (in s)

Index_2_16
190
196
1915.408
73
74
736.148
61.56704

Index_2_18
186
193
1876.467
68
69
685.511
63.468

@VijayanB does this approach seem reasonable to you?


Optimize data requests

Resolves #36

@BenPru can you confirm this is working as expected?

Yes, its working very good for me. Should I merge?

@BenPru Yes, feel free to merge!


Use Integrated jetty

Make use of integrated jetty to run the project.

Added Apache tomcat build plugin to run the project as tomcat is more popular than Jetty. Please comment if you have some other opinion.

tomcat should be sufficient. any one way to run the application without having to download additional software should be good

I merged the pullrequest.

This is fixed. Verified.


Only Messages can be encoded or decoded from json

What version of protobuf and what language are you using?
Version: 822fe56
What did you do?
Tried to encode an enum value as json
What did you expect to see?
The value encoded as string, as per the spec
What did you see instead?
An error. jsonpb only accepts *proto.Message

How did you get an error? An enum doesn't satisfy the Message interface, so I'm not sure how you were able to call jsonpb.Marshaler.Marshal with it.
Steeping back a bit, the protobuf language is only really designed around messages as a first-class types. Enums are just types that are only useful when used within a message. Thus, there is no support for directly marshaling/unmarshaling enums. This is a property of protobuf language, which we are not responsible for. Closing this as "working as intended".

@dsnet This is a compiler error, not a runtime error. Also, this is not "working as intended". I linked the actual specification, which disagrees with this. Doesn't seem like I can re-open so I guess I'll make a new ticket if this isn't re-opened in a few days

It is a compilation error precisely because the type system won't let you do something that the protobuf language does not permit. This is working as intended.

Perhaps this is just an issue with the way this page is written, but I can't find anything indicating that jsonpb representations are only valid for Messages. The document itself says the encoding is described on a "type-by-type basis".

This is kind of an in-built semantic of protobufs themselves. Nothing in protobufs really makes any sense outside of a message. You cannot really encode a single field of a protobuf in wire format without encapsulating it within a message. As a result, this semantic follows through to JSON encoding, even though various fields could be encoded in JSON independently.
In the end, the semantic must remain isolated to those of protobufs, and not broadened overwidely into generic JSON formatting.

I see. I guess I misunderstood from the spec I linked which seemed to read to me that individual types have their own representations, even if they don't in the same way as a Message.


Adding externalgit as deployment source for functionapp via CLI does not work

Describe the bug
We have a self hosted gitlab and want to provide all required resources for a functions app by using the Azure CLI.
The Functions app is created by using az functionapp create command. After this I am executing the command to config the deployment source (see related command).
It looks like, the CLI automatically uses mercurial as git source, but I am using externalgit.
Related command
az functionapp deployment source config `
    --resource-group $ResourceGroupName `
    --name $FunctionAppName `
    --repo-url $RepoUrl `
    --manual-integration `
    --repository-type externalgit `
    --branch deployment

Errors
Error message in the Azure Portal afterwards (in the logs of deployment sync):
abort: repository 'censored.git' not found!\n\r\nC:\Program Files (x86)\Mercurial\hg.exe pull 'censored.git' --branch 'deployment' --noninteractive

In the UI of Azure Portal:

Issue script & Debug output
As a result of az functionapp deployment source config in the terminal I receive the message:
{
  "branch": "deployment",
  "deploymentRollbackEnabled": false,
  "gitHubActionConfiguration": null,
  "id": "censored",
  "isGitHubAction": false,
  "isManualIntegration": true,
  "isMercurial": true,
  "kind": null,
  "location": "West Europe",
  "name": "censored",
  "repoUrl": "censored",
  "resourceGroup": "censored",
  "type": "Microsoft.Web/sites/sourcecontrols"
}

Expected behavior
When I add my external git source using the Azure Portal, I works perfectly and the UI looks like follows:

Environment Summary
azure-cli 2.55.0
Additional context
No response

Thank you for opening this issue, we will look into it.

Furthermore I am missing the ability to add username and password for the external git.

Is there any updates to this? Im having similar issues because of this?


Enforce the rule: heuristics should never add a new view that would be completely covered by an existing view

What

Resolves: https://github.com/rerun-io/rerun/issues/5152

This evaluates the queries of newly added space-views and doesn't add them if there already exists a space-view that would contain the same contents. This eliminates most of the worst offenders of unneeded-space-view creation, though re-loading recordings can still cause spurious root-space-views since those wouldn't technically be redundant.
Because this check operates on the query expressions it's independent of the actual state of the entity-tree.
Checklist

[x] I have read and agree to Contributor Guide and the Code of Conduct
[x] I've included a screenshot or gif (if applicable)
[ ] I have tested the web demo (if applicable):

Using newly built examples: app.rerun.io
Using examples from latest main build: app.rerun.io
Using full set of examples from nightly build: app.rerun.io

[x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
[x] If applicable, add a new check to the release checklist!

PR Build Summary
Docs preview
Examples preview
Recent benchmark results
Wasm size tracking

I don't understand the nuances of the heuristics enough to feel confident merging this without @Wumpf taking a look first

actually something weird here: Why is the root view added, that shouldn't have happend.
So on initial run I get the root and only the root

but then reset. Close. open again. I get the root again which shouldn't have been added

Right, the problem is that the heuristic still proposes / after it already has the other two space views which were loaded on startup. / is clearly not a superset of the other two so it's added.

Seems to be all addressed in the follow-up PR :)  (started testing it without reading yet)


fix tests

Codecov Report

Merging #6 (f9df30e) into main (27c8952) will decrease coverage by 0.06%.
The diff coverage is 90.90%.

@@            Coverage Diff             @@
##             main       #6      +/-   ##
==========================================
- Coverage   84.05%   83.99%   -0.07%
==========================================
  Files           6        6
  Lines         533      531       -2
==========================================
- Hits          448      446       -2
  Misses         85       85

Impacted Files
Coverage Δ

...rated_pixel_and_object_classification/_function.py
75.83% <83.33%> (+0.61%)
:arrow_up:

...ed_pixel_and_object_classification/_dock_widget.py
84.52% <100.00%> (-0.22%)
:arrow_down:

...and_object_classification/_tests/test_functions.py
100.00% <100.00%> (ø)

...l_and_object_classification/_tests/test_widgets.py
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


Which version I could use for RN0.60.5

Hi
In my project I use RN 0.60.5
I have latest 1.10, but it fails
Also I use Firebase 5.6 for RN
Unknown argument type 'UILocalNotification' in method -[RNCPushNotificationIOS presentLocalNotification:]. Extend RCTConvert to support this type.

my AppDelete.m
#import "AppDelegate.h"

#import "RNFirebaseMessaging.h"
#import "RNFirebaseNotifications.h"
#import <RNCPushNotificationIOS.h>

#import <Firebase.h>
#import <React/RCTBundleURLProvider.h>

#import <React/RCTRootView.h>
#import <ReactNativeNavigation/ReactNativeNavigation.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  [FIRApp configure];
  [RNFirebaseNotifications configure];
  NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
  [ReactNativeNavigation bootstrap:jsCodeLocation launchOptions:launchOptions];

  // Define UNUserNotificationCenter
  UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
  center.delegate = self;

  return YES;
}

// Required for the register event.
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
 [RNCPushNotificationIOS didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}

- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
  [[RNFirebaseNotifications instance] didReceiveLocalNotification:notification];
}

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo
                                                       fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler{
  [[RNFirebaseNotifications instance] didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
  [RNCPushNotificationIOS didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
}

// Required for the registrationError event.
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
{
 [RNCPushNotificationIOS didFailToRegisterForRemoteNotificationsWithError:error];
}

- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings {
  [[RNFirebaseMessaging instance] didRegisterUserNotificationSettings:notificationSettings];
}

// Required for localNotification event
- (void)userNotificationCenter:(UNUserNotificationCenter *)center
didReceiveNotificationResponse:(UNNotificationResponse *)response
         withCompletionHandler:(void (^)(void))completionHandler
{
  [RNCPushNotificationIOS didReceiveNotificationResponse:response];
}

//Called when a notification is delivered to a foreground app.
-(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
{
  completionHandler(UNNotificationPresentationOptionSound | UNNotificationPresentationOptionAlert | UNNotificationPresentationOptionBadge);
}

@end

the most recent version that working is 1.6.X
thank you

I have set min. version iOS from 9 to 10
run pod install
and finally it working with 1.9.0 while my project still use RN 0.60.5 )
the only thing I still can't manage that onNotification didn't work, while my firebase notifications handler did


build(deps): add 'nodemon'

Added nodemon to the API dependencies, as the API depends on it to run the start scripts. Without this, the user is expected to have nodemon installed as an env/system package, which they might not have. If this is the case, the Cofounder bootstrap CLI script will only partially succeed.

hi, did you see the one.js fullstack+mobile framework on top of react, react native (and vite js instead of metro for react native), could you get inspiration from it to enhance the mobile feature/support?
there is an universal ui framework https://github.com/mrzachnugent/react-native-reusables based also on shadcn/ui, you could use it

hi, did you see the one.js fullstack+mobile framework on top of react, react native (and vite js instead of metro for react native), could you get inspiration from it to enhance the mobile feature/support? there is an universal ui framework mrzachnugent/react-native-reusables based also on shadcn/ui, you could use it

This is unrelated to this issue

bwaha https://github.com/raidendotai/cofounder/issues/6

@stimpy77 :joy: amazing

I am curious about the possibility of on an AI-driven UI generation tool and to generate the stocks as well using the Ideogram API, inspired by the UXPin approach. I'm happy to dive in and handle the groundwork for this project. While I might need some guidance as I get up to speed, I'm a fast learner and eager to contribute effectively. I also have a heaps other enhancements as concepts but I wont info overload everyone.
Looking forward to working together and creating something awesome!
Product Requirements Document (PRD) for creating an AI-driven UI generation solution using the Ideogram API, inspired by the UXPin blog post on generating UI with AI.

Product Requirements Document (PRD)
1. Document Control

Author: [Your Name]
Date: [Current Date]
Version: 1.0
Approved by: [Approver's Name]
Last Updated: [Date]

2. Table of Contents

Introduction
Purpose
Scope
Definitions and Acronyms
Stakeholders
Requirements

6.1 Functional Requirements
6.2 Non-Functional Requirements

User Stories
Technical Specifications
UI/UX Considerations
Integration Points
Data Flow
Security and Compliance
Testing and Validation
Deployment and Maintenance
Timeline and Milestones
Risks and Mitigations
Appendix

1. Introduction
This PRD outlines the requirements for developing an AI-driven UI generation solution utilizing the Ideogram API. The solution aims to automate the creation of dynamic and customizable UI components, enhancing the efficiency and consistency of the design process, similar to the approach highlighted by UXPin.

2. Purpose
The purpose of this document is to define the functional and non-functional requirements, user stories, technical specifications, and other essential elements needed to develop a solution that leverages the Ideogram API for automated UI generation. This will guide the development team in building a product that meets user needs and aligns with business objectives.

3. Scope
In-Scope:

Integration with the Ideogram API for generating visual components such as diagrams, charts, and dynamic UI elements.
Development of a user interface that allows designers to specify parameters for UI generation.
Customization options to align generated components with the application's design language.
Real-time data handling to enable dynamic UI updates.
Embedding generated visuals into various frontend frameworks (e.g., React, Angular, Vue).

Out-of-Scope:

Full-fledged UI/UX design capabilities beyond visual component generation.
Integration with other design tools beyond those specified.
Advanced interactive features beyond the scope of Ideogram's capabilities.

4. Definitions and Acronyms

API: Application Programming Interface
PRD: Product Requirements Document
UI: User Interface
UX: User Experience
IDE: Integrated Development Environment
REST: Representational State Transfer
JSON: JavaScript Object Notation

5. Stakeholders

Product Manager: Oversees product development and ensures alignment with business goals.
UI/UX Designers: Utilize the tool to generate and integrate UI components.
Developers: Implement the integration with Ideogram API and build the frontend interface.
Quality Assurance (QA) Team: Test the functionality, performance, and reliability of the solution.
End Users: Designers and developers who will use the tool to enhance their UI design workflow.
Ideogram API Providers: Maintain and support the API used for generating visuals.

6. Requirements
6.1 Functional Requirements

API Integration:

The system must integrate seamlessly with the Ideogram API using the provided API key.
Support for making authenticated requests to the Ideogram API.

UI Component Generation:

Allow users to specify parameters for generating charts, diagrams, and other visuals.
Support various types of visual components as provided by the Ideogram API.

Customization Options:

Enable customization of generated visuals, including colors, sizes, fonts, and styles.
Provide templates or themes to ensure consistency with the application's design language.

Real-Time Data Handling:

Support dynamic data inputs to generate or update visuals in real-time.
Implement data binding to connect UI components with live data sources.

Embedding and Integration:

Facilitate embedding generated visuals into different frontend frameworks (e.g., React, Angular, Vue).
Provide code snippets or SDKs for easy integration.

User Interface:

Develop an intuitive UI for users to interact with the generation tool.
Include forms or wizards to guide users through the generation process.

Template Management:

Allow users to save, edit, and reuse templates for frequently used visual components.
Support versioning of templates to track changes over time.

Error Handling:

Implement comprehensive error handling for API failures, invalid inputs, and other potential issues.
Provide meaningful error messages to guide users in resolving issues.

6.2 Non-Functional Requirements

Performance:

Ensure that API calls and UI rendering occur with minimal latency.
Optimize the system to handle multiple concurrent requests efficiently.

Scalability:

Design the system to accommodate growing numbers of users and increased data volume.

Security:

Securely store and manage API keys and user data.
Implement authentication and authorization mechanisms to protect access.

Usability:

Create a user-friendly interface that requires minimal training.
Ensure accessibility compliance (e.g., WCAG standards).

Reliability:

Achieve high uptime and availability of the generation tool.
Implement redundancy and failover mechanisms.

Maintainability:

Write clean, modular, and well-documented code to facilitate maintenance and updates.
Enable easy integration of future features or API enhancements.

Compatibility:

Ensure compatibility with major browsers and frontend frameworks.
Support various device types and screen sizes.

7. User Stories

As a UI Designer, I want to generate dynamic charts based on real-time data so that my dashboards are always up-to-date.

As a Developer, I need to embed generated diagrams into my React application easily to streamline the development process.

As a Product Manager, I want to customize the appearance of generated visuals to align with our brand guidelines.

As a User, I want to save my preferred templates so that I can reuse them for future projects without starting from scratch.

As a QA Tester, I need comprehensive error messages to understand why a visual failed to generate, ensuring timely issue resolution.

As an Administrator, I want to manage API keys securely to protect against unauthorized access and usage.

8. Technical Specifications
8.1 Architecture

Frontend:

Framework: React.js (or Angular/Vue based on preference)
State Management: Redux or Context API
Styling: CSS-in-JS (e.g., Styled-Components) or traditional CSS/SASS

Backend:

Server: Node.js with Express.js (or any suitable backend framework)
API Layer: RESTful APIs to handle requests between frontend and Ideogram API

Database:

Type: NoSQL (e.g., MongoDB) or SQL (e.g., PostgreSQL) based on data complexity
Purpose: Store user preferences, templates, and usage data

Authentication:

Method: OAuth 2.0 or JWT-based authentication
Purpose: Secure access to the tool and manage user sessions

8.2 IDE Integration

Utilize modern IDEs like VS Code with relevant extensions for seamless development.

8.3 API Interaction

Endpoints:

Generate Visual: POST /ideogram/generate
Retrieve Templates: GET /templates
Save Template: POST /templates
Update Template: PUT /templates/:id
Delete Template: DELETE /templates/:id

Data Formats:

Requests and responses will use JSON format for data interchange.

8.4 Deployment

Environment:

Development: Local machines with necessary development tools
Staging: Cloud-based environment for testing (e.g., AWS, Azure)
Production: Scalable cloud infrastructure (e.g., AWS EC2, Kubernetes)

CI/CD Pipeline:

Tools: GitHub Actions, Jenkins, or CircleCI
Steps: Code linting, testing, building, and deployment automation

9. UI/UX Considerations

User-Friendly Interface:

Intuitive navigation and layout to guide users through the generation process.
Clear labeling and instructions for input fields and customization options.

Responsive Design:

Ensure the tool is accessible and functional across various devices and screen sizes.

Customization Controls:

Provide sliders, color pickers, and dropdowns for easy customization of visuals.
Real-time preview of changes to enhance user experience.

Template Management:

Easy-to-use interface for creating, saving, editing, and applying templates.
Visual indicators for template versions and compatibility.

Feedback Mechanisms:

Implement loading indicators during API calls.
Display success messages upon successful generation and informative error messages when issues arise.

Accessibility:

Adhere to accessibility standards to ensure the tool is usable by individuals with disabilities.

10. Integration Points

Ideogram API:

Primary integration for generating visual components based on user inputs.

Frontend Frameworks:

Ensure compatibility with React, Angular, Vue, and other popular frameworks for embedding visuals.

Authentication Services:

Integrate with OAuth providers or internal authentication systems for secure access.

Data Sources:

Connect with external data sources (e.g., APIs, databases) to feed real-time data into visuals.

Third-Party Libraries:

Utilize libraries for enhanced functionality, such as charting libraries for additional visualization options.

11. Data Flow

User Interaction:

User accesses the generation tool via the frontend interface.
Inputs parameters and customization options for the desired visual component.

Frontend Processing:

The frontend captures user inputs and sends a request to the backend API.

Backend Processing:

The backend validates the inputs and constructs a request to the Ideogram API using the provided API key.
Sends the request to Ideogram and awaits the response.

Ideogram API Response:

Ideogram generates the visual component based on the request and returns the data (e.g., SVG, JSON).

Backend Handling:

The backend processes the Ideogram response, applies any additional transformations if necessary, and sends it back to the frontend.

Frontend Rendering:

The frontend receives the generated visual and embeds it into the UI framework.
Displays the visual to the user with the applied customizations.

Data Persistence:

If the user saves the template, the frontend sends a request to the backend to store the template in the database.

12. Security and Compliance

API Key Management:

Secure storage of Ideogram API keys using environment variables or secure vault services.
Restrict access to API keys to authorized personnel and services only.

Data Protection:

Encrypt sensitive data both in transit (using HTTPS) and at rest.
Comply with data protection regulations such as GDPR or CCPA as applicable.

Authentication and Authorization:

Implement robust authentication mechanisms to ensure only authorized users can access the tool.
Role-based access control (RBAC) to manage user permissions.

Input Validation:

Validate all user inputs to prevent injection attacks and ensure data integrity.

Audit Logging:

Maintain logs of user activities, API interactions, and system events for monitoring and auditing purposes.

Third-Party Compliance:

Ensure that integration with Ideogram API complies with their terms of service and data handling policies.

13. Testing and Validation

Unit Testing:

Test individual components and functions to ensure they work as intended.

Integration Testing:

Verify the seamless interaction between frontend, backend, and Ideogram API.

End-to-End Testing:

Simulate user workflows to ensure the entire process from input to visual generation functions correctly.

Performance Testing:

Assess the system's responsiveness and stability under various load conditions.

Security Testing:

Conduct vulnerability assessments and penetration testing to identify and mitigate security risks.

User Acceptance Testing (UAT):

Engage real users to validate that the tool meets their needs and expectations.

Regression Testing:

Ensure that new changes do not adversely affect existing functionalities.

14. Deployment and Maintenance

Deployment Strategy:

Use a phased approach: Development → Staging → Production.
Implement continuous integration and continuous deployment (CI/CD) pipelines for automated deployments.

Monitoring:

Set up monitoring tools (e.g., New Relic, Datadog) to track system performance, uptime, and error rates.

Maintenance Plan:

Schedule regular updates and patches to address bugs, security vulnerabilities, and feature enhancements.
Maintain comprehensive documentation for ongoing support and onboarding.

Backup and Recovery:

Implement regular data backups and establish disaster recovery procedures to prevent data loss.

Support:

Provide user support channels (e.g., helpdesk, documentation, tutorials) to assist users with issues and inquiries.

15. Timeline and Milestones

Milestone
Description
Target Date

Project Kickoff
Initial project setup and team alignment
[Date]

Requirement Finalization
Complete PRD and gather stakeholder approval
[Date]

Design Phase
UI/UX design mockups and user flow diagrams
[Date]

API Integration Development
Develop backend integration with Ideogram API
[Date]

Frontend Development
Build user interface and interaction components
[Date]

Template Management Feature
Implement template creation and management
[Date]

Customization Features
Develop customization options for visuals
[Date]

Testing Phase
Conduct all levels of testing (unit, integration)
[Date]

User Acceptance Testing (UAT)
Validate with end users
[Date]

Deployment to Production
Launch the tool for public use
[Date]

Post-Launch Monitoring and Support
Ongoing support and issue resolution
Ongoing

Note: Replace [Date] with specific target dates based on your project timeline.

16. Risks and Mitigations

Risk
Impact
Likelihood
Mitigation Strategy

API Rate Limits Exceeded
High
Medium
Implement request throttling and caching mechanisms

Dependency on Ideogram API Availability
High
Medium
Establish fallback options or redundant systems

Security Vulnerabilities in API Integration
High
Low
Conduct regular security audits and penetration tests

Performance Bottlenecks
Medium
Medium
Optimize code, use efficient data handling practices

User Adoption Challenges
Medium
Medium
Provide comprehensive documentation and tutorials

Data Privacy Compliance Issues
High
Low
Ensure compliance with relevant data protection laws

Customization Limitations of Ideogram API
Medium
High
Plan for additional customization layers or tools

17. Appendix
17.1 References

Ideogram API Documentation
UXPin Blog: Generate UI with AI
WCAG Accessibility Guidelines

17.2 Glossary

Diagram: A graphical representation of data or processes.
Chart: A visual display of information using symbols like bars, lines, or slices.
Template: A pre-designed structure used as a starting point for creating new visuals.

17.3 Contact Information

Product Manager: [Name, Email, Phone]
Technical Lead: [Name, Email, Phone]
Support Team: [Email, Phone]

Conclusion
This PRD serves as a foundational guide for developing an AI-driven UI generation solution leveraging the Ideogram API. By adhering to the outlined requirements, engaging stakeholders effectively, and addressing potential risks proactively, the project aims to deliver a robust and user-friendly tool that enhances the UI/UX design workflow.


Q: how to terminate forever's sub-process under windows (8.1)?

forever bin\www works normally. But I can't terminate it. ctrl+c asks about "Terminate batch job (Y/N)? Y", but node.exe process isn't terminated. Specifically, forever bin\www spawns 2 (two) node.exe processes, and sequential execution throws Error: listen EADDRINUSE at me.
Tried cmd.exe, powershell.exe, same result. Forever is v0.14.1

@mr-moon did you find any workaround to this issue? I can confirm the issue on Windows 7 and 0.15.1 too.

Affects me too. Will try to fix.

Here's my fix but i don't understand why checks have failed. Everything is fine when i run it on my PC.
https://github.com/foreverjs/forever/pull/778

Happens on Windows 7 with forever 0.15.2.


Fix link in options.md

Good catch! It surprises me that the multiple and strict docs linters didn't detect that.

I thought the same! cc @jdbaldry @grafsean


Automate finding the latest version of ubuntu-xenial stemcell like we do for trusty

See https://github.com/cf-platform-eng/tile-generator/blob/a145b20bcaedc554ea9fa457afc49439ea5f426e/tile_generator/config.py#L285
We should that for ubuntu-xenial stemcells too.

Is this being actively worked on? if not i'd be interested in taking a stab at it.

Not being worked on afaik. Grab @keshto or me for any guidance.
Like I said in our slack conversation, imho we can do this for only xenial at this point, and make folks using trusty manually set the stemcell version (trusty is going out of support in a few months anyway).

We've implemented this in PR #293 - let me know if you have any questions!


[B0FieldIdentifier] repeated between subjects makes fmriprep crash

What happened?
I tried using B0FieldIdentifier and B0FieldSource for susceptibility distortion correction. According to BIDS Spec, I've added
"B0FieldIdentifier": "phdiff_fmap0",

in .../fmap/...phasediff.json, and added
"B0FieldSource": "phdiff_fmap0",

in .../func/...bold.json for each subjects. I.e., I use the same identifier for all subjects.
When I tried run fmriprep for multiple participants at once, I got the error.
Is it required that this identifier MUST be different across subjects? Or are there chances to improve fmriprep such that we only need the identifier be unique within one subject?
What command did you use?
ocker run -it --rm -v bids:/data:ro -v fmriprep:/out nipreps/fmriprep:24.0.1 --notrack --fs-no-reconall /data /out participant

What version of fMRIPrep are you running?
24.0.1
How are you running fMRIPrep?
Docker
Is your data BIDS valid?
Yes
Are you reusing any previously computed results?
No
Please copy and paste any relevant log output.
Process Process-2:
Traceback (most recent call last):
  File "/opt/conda/envs/fmriprep/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/opt/conda/envs/fmriprep/lib/python3.11/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/conda/envs/fmriprep/lib/python3.11/site-packages/fmriprep/cli/workflow.py", line 126, in build_workflow
    retval['workflow'] = init_fmriprep_wf()
                         ^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/fmriprep/lib/python3.11/site-packages/fmriprep/workflows/base.py", line 94, in init_fmriprep_wf
    single_subject_wf = init_single_subject_wf(subject_id)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/fmriprep/lib/python3.11/site-packages/fmriprep/workflows/base.py", line 515, in init_single_subject_wf
    fmap_estimators, estimator_map = map_fieldmap_estimation(
                                     ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/fmriprep/lib/python3.11/site-packages/fmriprep/workflows/base.py", line 763, in map_fieldmap_estimation
    fmap_estimators = find_estimators(
                      ^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/fmriprep/lib/python3.11/site-packages/sdcflows/utils/wrangler.py", line 354, in find_estimators
    e = fm.FieldmapEstimation(
        ^^^^^^^^^^^^^^^^^^^^^^
  File "<attrs generated init sdcflows.fieldmaps.FieldmapEstimation>", line 7, in __init__
    self.__attrs_post_init__()
  File "/opt/conda/envs/fmriprep/lib/python3.11/site-packages/sdcflows/fieldmaps.py", line 434, in __attrs_post_init__
    _estimators[self.bids_id] = self.paths()
    ~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/opt/conda/envs/fmriprep/lib/python3.11/site-packages/sdcflows/utils/bimap.py", line 144, in __setitem__
    raise KeyError(
KeyError: "'phdiff_fmap0' is already  in mapping"

Additional information / screenshots
Even when the identifier is the same across all subjects, it works normal if I run fmriprep for each subject separately via --participant-label. If we need to use different identifiers for each subjects, then the behavior of fmriprep differs when run for one subject versus run for multiple subjects, which seems unnatural.
Last but not least, if the identifier must be unique, why bids-validator passed with no error?

Thanks for reporting this! I never actually run multiple subjects at once, so didn't catch this. This will be an issue with sdcflows, so I'm going to transfer the issue there. Without any deep investigation, I suspect this is going to be a fairly high-effort fix. On your end, I would suggest renaming your B0Fields and moving on.


Update service bus peek lock method to accept timeout

This extension of the library is a mob effort from

@TimboTambo
@rjkerrison
@craiga
@pataruco
@StuartHarris
@m-doughty

We are enabling peek_lock to handle timeout params for lock duration
We are aiming to:

[ ] Write unit tests
[ ] Write documentation

Hi @MindFlavor, I hope  you are well and safe!, please can you review the following PR?

Thanks @MindFlavor , please merged!


Data Hub - Routing: Milestones and Features

Summary
The Data Hub - Routing project will provide the infrastructure to send data generated from the Data Input App. To achieve this, we will need to build the ability to send the data and to reformat the data to adhere to unique needs of each PHD.
Milestones to achieve an MVP

Fake data
Test data + Auth
MVP: Real data + Auth
Post MVP milestones
Monitoring
Easier configurability

Sending and transforming
"Once data is collected by the Data Input app, the Routing app will send it to the correct PHD in the correct format."

App can figure out where to send the data the proper jurisdiction
App can transform the data to send the fields required by the target PHD, in the required format

Authentication and security
"The app securely connects with each PHD. Along the way, data is protected."

App is able to save authentication information for each individual PHD
App is able to authenticate with different types of configurations
App has proper restrictions on what data is sent/accessible

Configuration: Pilot customers
"For our first pilot customers, we know the requirements to connect with each jurisdiction"

What are the data requirements for each PHD
What are the logistics/timeline for connecting with each of them

--
Monitoring
"As a human interacting with the app, I can get helpful updates about the status of data I expect to be sent"

Receipts back to sender
...

Configuration: scalability
"As USDS/CDC works with more PHDs, we can easily add more jurisdictions to the Routing app"

App can save settings for each unique jurisdiction
...

One suggestion is to put the amount of test results expected to be handled by each milestone.

Moved to Data Hub repo: https://github.com/CDCgov/prime-data-hub/issues/4

@drew-usds @RickHawesUSDS  updated the README with a general spec, lmk what you think https://github.com/CDCgov/prime-data-hub/blob/master/README.md


feat(#168): add more tests for Add class and implement Cast

In this PR I added type inference for addition. Also Cast nod were added to resolve cast operations.
Closes: #168.

History:

feat(#168): add more tests for Add class
feat(#168): add ExpressionType class
feat(#168): remove redundant code
feat(#168): fix simple bug in Literal class and add one more test for Add
feat(#168): Invocation type
feat(#168): add more tests for Cast
feat(#168): add smart constructor for Literal
feat(#168): add cast decompilation/compilation
feat(#168): add ConstHandler that can understand many opcodes
feat(#168): add one more puzzle to remove ad-hoc solution in the future
feat(#168): disable integration tests
feat(#168): fix all qulice suggestions
feat(#168): add one more puzzle

PR-Codex overview
This PR introduces type inference improvements and refactors code in Add, Substraction, InvokeInterfaceHandler, and related classes.
Detailed summary

Added Typed interface to Invocation and Add classes
Implemented ExpressionType to determine expression type
Refactored instruction handlers in RouterHandler and CastHandler
Updated pom.xml for maven-invoker-plugin configuration

The following files were skipped due to too many changes: src/main/java/org/eolang/opeo/decompilation/handlers/RouterHandler.java, src/test/java/org/eolang/opeo/ast/AddTest.java, src/main/java/org/eolang/opeo/ast/Literal.java, src/main/java/org/eolang/opeo/decompilation/handlers/ConstHandler.java, src/test/java/org/eolang/opeo/ast/CastTest.java, src/main/java/org/eolang/opeo/ast/Cast.java

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@rultor merge

@rultor merge

@volodya-lombrozo OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge

@volodya-lombrozo Done! FYI, the full log is here (took me 3min)


Implement foreach({expr1}, {expr2})

Not sure which lock errors might be returned, will adjust the help as needed. Assuming can put the list/dict into lockvar 1 mode and pass on whatever errors show up.
If setting/clearing the lock is cheap, is it worth considering retrofitting map() and filter() to have expr1 under lock until a change needs to be made?
Test
foreach should work if called with an expr1  that has lockvar 1 set.

foreach() now works for a list (limited testing). A review of the
approach is appreciated before looking at dict/blob/string.
One line lambda with a command
I was hoping to be able to do something like
l->foreach((_, v) => dict1[v] += 1)

which fails because dict1[v] += 1 is not an expression.
The following, void return and/or :, also don't work, but might be a
reasonable way to signal the intent for a semantic extension.
Using : void seems the most clear.
l->foreach((_, v): void => dict1[v] += 1)
l->foreach((_, v) => :dict1[v] += 1)

Would something like this be acceptable?
Variable locking
Turns out that in list_filter_map() there is some locking; keep that
behavior for foreach(). Since top level lock is an integer assignment, it
should be cheap to keep a FILTERed list locked uless/until an element is
removed. Is that worth adding to prevent list modification while traversing
the list?
Executing a string
In filter_map_one(), at the top, there's now
    if (filtermap == FILTERMAP_FOREACH && expr->v_type == VAR_STRING)
    {
	// foreach() is not limited to an expression
	do_cmdline_cmd(expr->vval.v_string);
        ...

Is this the best way? Or at least good enough?
Help text
In the help for map() and filter() there's
When {expr2} is a Funcref errors inside a function are ignored,
unless it was defined with the "abort" flag.

It's included in the foreach() help, but I don't know what/why. What's
a better way to word this?

This PR is needs to be udpated with https://github.com/vim/vim/commit/e6d40dcdc7227594935d2db01eca29f0e575dcee, and add some more tests.

Last push is a rebase to master, should be no other changes. Now for tests and fixes.

Patch is ready for review/integration.
One thing, the help text for foreach(), map(), filter() has
When {expr2} is a Funcref errors inside a function are ignored,
unless it was defined with the "abort" flag.

Which I found confusing. Having done tests for foreach(), I have a better
sense of what this is about.
But it seems like the text should be updated for the modern era, but
uncertain about the best wordsmithing.

Link to mailing list discussion that drove and references this PR
https://groups.google.com/g/vim_dev/c/Q3S6rjBWqGY/m/6dmfhWapDAAJ

Rebase PR to todays master.

Rebase PR to today's master.

foreach() now works for a list (limited testing). A review of the
approach is appreciated before looking at dict/blob/string.
One line lambda with a command
I was hoping to be able to do something like
l->foreach((_, v) => dict1[v] += 1)

which fails because dict1[v] += 1 is not an expression.

You can use an inline function in Vim9 script, see
":help inline-function".  The overhead will be more than evaluating an
expression string, but that has limited functionality.
If you only pass the index or key to the function, the item in the
Dict/List needs to be looked up again.  We don't have pointers to use
for this.  If you do want to change the value of each item, then map()
would be used, thus it should not really matter much.

Variable locking
Turns out that in list_filter_map() there is some locking; keep that
behavior for foreach(). Since top level lock is an integer assignment, it
should be cheap to keep a FILTERed list locked uless/until an element is
removed. Is that worth adding to prevent list modification while traversing
the list?

I would find it unexpected that foreach() changes the structure it's
iterating over.  At least adding/removing items interferes with looping
over all of them.  Changing the item values should not be a problem.
Goal is that it works predictably: Either it just works or an error is
given that the user will easily understand.

Executing a string
In filter_map_one(), at the top, there's now
    if (filtermap == FILTERMAP_FOREACH && expr->v_type == VAR_STRING)
    {
	// foreach() is not limited to an expression
	do_cmdline_cmd(expr->vval.v_string);
        ...

Is this the best way? Or at least good enough?

How would the index or item value be used here?  It only makes sense
when the command includes an expression that uses local variables for
this.  The use seems rather limited.  Restricting this to a function
reference should keep it simple.  Unless you can think of a useful need
that foreach() would do that won't work with that.  Considering that a
function is a sequence of commands, it should always cover the case of
executing one command.

Help text
In the help for map() and filter() there's
When {expr2} is a Funcref errors inside a function are ignored,
unless it was defined with the "abort" flag.

It's included in the foreach() help, but I don't know what/why. What's
a better way to word this?

Ignoring errors was something we did longer ago.  New functionality
added the last few years usually bails out at the first error.  I would
think that foreach() should abort when an error is found, instead of
continuing with the following items (of which there might be many,
resulting in screens full of error messages).  In case some error should
be ignored try/catch can be used, but most errors would be caused by a
mistake in the invoked commands and just need to be fixed
--
"Making it up?  Why should I want to make anything up?  Life's bad enough
as it is without wanting to invent any more of it."
-- Marvin, the Paranoid Android in Douglas Adams'
"The Hitchhiker's Guide to the Galaxy"
/// Bram Moolenaar -- @.*** -- http://www.Moolenaar.net   \
///                                                                      \
\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

I originally posted this to the wrong PR, sorry for the dup
Since the PR was posted, it is now complete; what I mean to say is now
ready for review. It's consistent with the spec for, and shares code
with: map(), mapnew() and filter(). There is help and tests for the new
functionality, and some new tests for the older functions particularly
around locking, for example exceptions if trying to modify stucture while
iterating. List/dict/blob are all handled.
Of course, if similarity with map/filter isn't important then things can
probably be simplified.
There's some curious performance data at the end

foreach() now works for a list (limited testing). A review of the
approach is appreciated before looking at dict/blob/string.
One line lambda with a command
I was hoping to be able to do something like
l->foreach((_, v) => dict1[v] += 1)

which fails because dict1[v] += 1 is not an expression.

You can use an inline function in Vim9 script, see
":help inline-function". The overhead will be more than evaluating an
expression string, but that has limited functionality.

Right. I was hoping to have a one-liner, but
l->foreach((_, v) => {
    found[v] = true
})

works fine.

If you only pass the index or key to the function, the item in the
Dict/List needs to be looked up again. We don't have pointers to use
for this. If you do want to change the value of each item, then map()
would be used, thus it should not really matter much.

Variable locking
Turns out that in list_filter_map() there is some locking; keep that
behavior for foreach(). Since top level lock is an integer assignment, it
should be cheap to keep a FILTERed list locked uless/until an element is
removed. Is that worth adding to prevent list modification while traversing
the list?

I would find it unexpected that foreach() changes the structure it's
iterating over. At least adding/removing items interferes with looping
over all of them. Changing the item values should not be a problem.
Goal is that it works predictably: Either it just works or an error is
given that the user will easily understand.

Since originally writing this, PR#12183 was merged, and resolved most
issues in my mind. An exception is thrown if foreach tries to modify
the structure of the input.

Executing a string
In filter_map_one(), at the top, there's now
if (filtermap == FILTERMAP_FOREACH && expr->v_type == VAR_STRING)
{
// foreach() is not limited to an expression
do_cmdline_cmd(expr->vval.v_string);
...

Is this the best way? Or at least good enough?

How would the index or item value be used here?

The example I put into help is
call foreach(mylist, 'found[v:val] = true')

It only makes sense
when the command includes an expression that uses local variables for
this. The use seems rather limited. Restricting this to a function
reference should keep it simple.

It should be easy to take out this functionality if you want.
I kept it consistent with map/mapnew/filter.

Unless you can think of a useful need
that foreach() would do that won't work with that. Considering that a
function is a sequence of commands, it should always cover the case of
executing one command.

Help text
In the help for map() and filter() there's
When {expr2} is a Funcref errors inside a function are ignored,
unless it was defined with the "abort" flag.

It's included in the foreach() help, but I don't know what/why. What's
a better way to word this?

Ignoring errors was something we did longer ago. New functionality
added the last few years usually bails out at the first error. I would
think that foreach() should abort when an error is found, instead of
continuing with the following items (of which there might be many,
resulting in screens full of error messages). In case some error should
be ignored try/catch can be used, but most errors would be caused by a
mistake in the invoked commands and just need to be fixed

Errors abort. At the time of writing, I was confused by the "abort" flag
which I think is legacy.
Below are profiling results of different ways to use foreach. The value
given for a cell is the result of the line executed 99 times; the length
of the list being operated on is 1, 2, 3, 6, 12, 24. There were 20 runs,
and the smallest (fastest) value selected. Each line, except ###-0, does
some form of add(result, val).
=== foreach builtin micro-prof, 20 run/params ===
   1x99   2x99   3x99   6x99  12x99  24x99 : nListXnLoop (usec/op)
  8.802  8.637  8.526  8.719  8.712  8.622 : var TFEC = FEC('(_, val: number): void =>: add( ###-0
  1.503  2.758  3.994  7.697 15.106 29.666 : foreach(input, 'add(result, v:val)')            ###-4
  0.175  0.291  0.409  0.749  1.401  2.709 : for l in input|add(result, l)|endfor            ###-9
  0.982  1.307  1.547  2.379  4.227  7.556 : foreach(input, VarFEC)                          ###-E
  0.572  0.898  1.115  1.901  3.674  7.100 : foreach(input, # ()=>                           ###-L
  0.669  1.187  1.610  2.944  5.758 11.616 : foreach(input, Foreach1)                        ###-R
  0.679  1.197  1.583  2.989  5.806 11.145 : foreach(input, RefForeach1)                     ###-j
  0.552  0.877  1.115  1.935  3.645  7.000 : foreach(input, ScriptFEC)                       ###-p

Using/evaluating a string, ###-4, is very slow, I guess it's running
through the whole interpreter each time; maybe using a string argument
should give an error as you suggested. An inline for loop, ###-9, is the
big winner as expected at around 2.7 usec/op.
After inline, ###-L and ###-p weigh in at about 7 usec/op where the
function argument is a lambda.
###-R and ###-j are over 11 usec/op where the function argument is a
top level def from the script.
Looks like a regular function is around 40% slower than a lambda;
this was surprising to me.
###-L is
foreach(input, # ()=>                 ###-L
    (_, val: number): void => {
        add(result, val)
})

###-p uses ScriptFEC, which is a script level variable generated by
var ScriptFEC = FEC('(_, val: number): void =>: add(result, val)')

where FEC parses and compiles it's input and returns a function, it's
signature:
def FEC(code: string): func(any, any): void

###-R and ###-j are defined as
def Foreach1(_, val: number): void # : list<number>
    add(result, val)
enddef
var RefForeach1 = Foreach1

Of course, if similarity with map/filter isn't important then things can
probably be simplified.

Well, map() and filter() may have some ballast from old days that we
don't need to replicate with foreach().  But for users it may not be
clear what the reason is something works the way it does.  We can try to
make things work similarly, unless the difference is obvious or just
better (and can be explained).

Executing a string
In filter_map_one(), at the top, there's now
if (filtermap == FILTERMAP_FOREACH && expr->v_type == VAR_STRING)
{
// foreach() is not limited to an expression
do_cmdline_cmd(expr->vval.v_string);
...

Is this the best way? Or at least good enough?

How would the index or item value be used here?

The example I put into help is
call foreach(mylist, 'found[v:val] = true')

It only makes sense
when the command includes an expression that uses local variables for
this. The use seems rather limited. Restricting this to a function
reference should keep it simple.

It should be easy to take out this functionality if you want.
I kept it consistent with map/mapnew/filter.

Well, it's not really consistent.  It is a string, but instead of used
as an expression it is used as an Ex command.  That does make sense,
since for an expression we don't have an obvious place to store the
result.  But a user may need to read the help carefully to understand
this.
Someone using foreach() may wonder whether to use a function with the
command or use a string with the command directly.  Is there a clear
explanation for which one should be used?  Using the string is simpler,
any disadvantage?

Errors abort. At the time of writing, I was confused by the "abort" flag
which I think is legacy.

Correct, compiled functions always bail out at the first error, as if
the "abort" flag is always present.

Below are profiling results of different ways to use foreach. The value
given for a cell is the result of the line executed 99 times; the length
of the list being operated on is 1, 2, 3, 6, 12, 24. There were 20 runs,
and the smallest (fastest) value selected. Each line, except ###-0, does
some form of add(result, val).
=== foreach builtin micro-prof, 20 run/params ===
   1x99   2x99   3x99   6x99  12x99  24x99 : nListXnLoop (usec/op)
  8.802  8.637  8.526  8.719  8.712  8.622 : var TFEC = FEC('(_, val: number): void =>: add( ###-0
  1.503  2.758  3.994  7.697 15.106 29.666 : foreach(input, 'add(result, v:val)')            ###-4
  0.175  0.291  0.409  0.749  1.401  2.709 : for l in input|add(result, l)|endfor            ###-9
  0.982  1.307  1.547  2.379  4.227  7.556 : foreach(input, VarFEC)                          ###-E
  0.572  0.898  1.115  1.901  3.674  7.100 : foreach(input, # ()=>                           ###-L
  0.669  1.187  1.610  2.944  5.758 11.616 : foreach(input, Foreach1)                        ###-R
  0.679  1.197  1.583  2.989  5.806 11.145 : foreach(input, RefForeach1)                     ###-j
  0.552  0.877  1.115  1.935  3.645  7.000 : foreach(input, ScriptFEC)                       ###-p

Using/evaluating a string, ###-4, is very slow, I guess it's running
through the whole interpreter each time; maybe using a string argument
should give an error as you suggested.

Yes, the command will have to be parsed every time, and a function call
used from an Ex command has quite a bit of overhead.

An inline for loop, ###-9, is the big winner as expected at around
2.7 usec/op.

The difference is bigger than I would expect.  You did execute this in a
compiled function, where the commands have been turned into byte code?
Then the function call overhead is probably the lowest.  Oh wait, the
add() call is actually inlined if the argument is known to be a list or
blob.  That must help a lot.  Using another function may give very
different results.

After inline, ###-L and ###-p weigh in at about 7 usec/op where the
function argument is a lambda.
###-R and ###-j are over 11 usec/op where the function argument is a
top level def from the script.
Looks like a regular function is around 40% slower than a lambda;
this was surprising to me.

For using a function call, I still want to have another look at whether
the overhead can be reduced.  But there are so many other things that
compete for my time...
--
This planet has -- or rather had -- a problem, which was this: most
of the people living on it were unhappy for pretty much of the time.
Many solutions were suggested for this problem, but most of these
were largely concerned with the movements of small green pieces of
paper, which is odd because on the whole it wasn't the small green
pieces of paper that were unhappy.
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
/// Bram Moolenaar -- @.*** -- http://www.Moolenaar.net   \
///                                                                      \
\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

There seems to be general agreement on foreach() spec.
The only remaining issue is whether or not a string needs
to be supported in addition to func/funcref.

...
The example I put into help is
call foreach(mylist, 'found[v:val] = true')

...

Well, it's not really consistent. It is a string, but instead of used
as an expression it is used as an Ex command. That does make sense,
since for an expression we don't have an obvious place to store the
result. But a user may need to read the help carefully to understand
this.
Someone using foreach() may wonder whether to use a function with the
command or use a string with the command directly. Is there a clear
explanation for which one should be used? Using the string is simpler,
any disadvantage?

Performance seems the primary disadvantage as seen in the previously
provided performance results.
I suppose optimization is possible in the future. Could the string be
compiled and saved in a map of cache[string] = compiled_code. Unless
such a mechanism is useful in other situations, probably not worth it
since using a function/funcref works.
But the string is more compact since with a lambda, one needs to do
l->foreach((_, v) => {
    found[v] = true
})

Which is why I put together a vim9 function,
def LC(code: string): func(any, any): void

compiles code returning a function which can be used like
foreach(mylist, LC('(_, val) =>: found[val] = true'))

Where LC is LambdaCompile. I used =>: to indicate that

the RHS is a statement, not an expression
only one line, can not continue to next line, {} block not allowed
minimize confusion with the standard vim9 lambda expression

LC() is a hack and has the major disadvantage that  there's
no context capture. But it was fun putting together the function
that parses the input and compiles a function.

Someone using foreach() may wonder whether to use a function with the
command or use a string with the command directly. Is there a clear
explanation for which one should be used? Using the string is simpler,
any disadvantage?

Performance seems the primary disadvantage as seen in the previously
provided performance results.
I suppose optimization is possible in the future. Could the string be
compiled and saved in a map of cache[string] = compiled_code. Unless
such a mechanism is useful in other situations, probably not worth it
since using a function/funcref works.

Compiling has most effect for commands related to execution flow, such
as if/while/try/etc. and expressions.  Otherwise most Ex commands are
not compiled currently.  One that might be useful is assignment.  But
only doing that for this specific use case is quite a lot of work with
little gain.  And when the string is not a constant compilation isn't
feasible anyway.

But the string is more compact since with a lambda, one needs to do
l->foreach((_, v) => {
    found[v] = true
})

Which is why I put together a vim9 function,
def LC(code: string): func(any, any): void

compiles code returning a function which can be used like
foreach(mylist, LC('(_, val) =>: found[val] = true'))

Where LC is LambdaCompile. I used =>: to indicate that

the RHS is a statement, not an expression
only one line, can not continue to next line, {} block not allowed
minimize confusion with the standard vim9 lambda expression

LC() is a hack and has the major disadvantage that  there's
no context capture. But it was fun putting together the function
that parses the input and compiles a function.

It's a nice trick, but not without disadvantages.  The example you
started with isn't really so bad, it's all in one place.  It may have
two line breaks but otherwise no extra characters other than the {}.
--
Due knot trussed yore spell chequer two fined awl miss steaks.
/// Bram Moolenaar -- @.*** -- http://www.Moolenaar.net   \
///                                                                      \
\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Rebase PR to todays master.

Fix for test_codestyle.

Rebase PR to today's master.
This PR adds a new builtin. Up to this this point, review has mostly been conceptual. Some in this PR and notice there's a link to discussion in vimgroup.
This is not urgent.

Rebase to current master

Rebased to current master.
History of this PR
Adds foreach() which is similar to filter(), map() and mapnew()  (and shares their implementation). Each of the 4 has the same argument signature: (list|string|blob|dict, funcref|string)
The difference between foreach() and the rest is that

the original list is never modified
{expr2} is executed, not evaluated

The forum discussion that led to this PR is
https://groups.google.com/d/msgid/vim_dev/b8e2b8fa-c6d8-cc41-ac63-6b1d21a75f41%40raelity.com
This PR has some additional tests for the existing filter() like functions, particularly for when {expr1} is locked.
While testing/debugging for this PR ran into a crash in released code fixed by https://github.com/vim/vim/commit/e6d40dcdc7227594935d2db01eca29f0e575dcee
The discussion with Bram in this PR's comments took place in May of 2023.
The PR has not been modified, other than rebase, since March of 2023. (well, there was a minor change in June,
https://github.com/vim/vim/compare/7ee5f12638ef84844eb6d560f71277cfb846aa08..6937bd3ff5cda356f82dda6e19f72286de8603d0,
because test_codestyle did more checking)

For help do make tags.

thanks. Let me include this.


Support local Kinesis e.g. Kinesalite and add some functional tests

The functional tests run against a local Kinesis e.g. Kinesalite.
I need this for testing my own app which uses go-kinesis. But I think it’s also useful for testing go-kinesis itself. I have a feature I’d like to add but I don’t think it’d be safe to do so without some functional tests.

Hello. Big thanks.
But I think you need run Kinesalite inside travis, because test right now failed. https://travis-ci.org/sendgridlabs/go-kinesis/builds/55970862

Hello. Big thanks.

My pleasure!

But I think you need run Kinesalite inside travis, because test right now failed. https://travis-ci.org/sendgridlabs/go-kinesis/builds/55970862

Right, of course! Will do.

Looks like the build passed!

thanks!


build(toolchain):setup and configure eslint, prettier and pre-commit …

Fixes : #75

Any reason why .env.local.sample file is deleted? Can you please mention this in wallora slack channel to see if others are fine with it?

Added back


How to set MQTT-Client?

I have set MQTT-Broker by mosquitto on <IP_ADDRESS>
and set MQTT-Client as the followiing ,
`

telnet <IP_ADDRESS> 7777

CMD>set mqtt_host  <IP_ADDRESS>
MQTT host set
CMD>set mqtt_port  1883
MQTT port set
CMD>set mqtt_command_topic /WiFi/Router01/command
MQTT command topic set
CMD>set mqtt_interval 5
MQTT interval set
CMD>set mqtt_mask ffff
MQTT mask set
CMD>save
CMD>reset

`
However when I open MQTT-SPY  , MQTT it seem not work .
How to set MQTT-Client to view?
Thank you.

Config looks good (if <IP_ADDRESS> is really the MQTT broker, what I assume). What does "show mqtt" report? Is there any message in the serial log at boot time?

`
CMD> show mqtt
MQTT host: <IP_ADDRESS>
MQTT port: 1883
MQTT user:
MQTT password:
MQTT id:
MQTT prefix:
MQTT command topic: /WiFi/Router01/command
MQTT gpio_out topic:
MQTT interval: 5 s
MQTT mask: ffff
CMD>reset
`
After reset ESP-WiFi-Repeater,  MQTT-Broker on <IP_ADDRESS>  will be disconnected automatically.
And message in the serial log at boot time as the following..
[Serial log]
`
Repeater V1.4 starting
Config found and loaded
Starting Console TCP Server on port 5559
mode : sta(18:fe:34:e0:bf:ff) + softAP(1a:fe:34:e0:bf:ff)
add if0
add if1
dhcp server start:(ip:<IP_ADDRESS>,mask:<IP_ADDRESS>,gw:<IP_ADDRESS>)
bcn 100
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 3
cnt
connected with MyHome, channel 6
dhcp client start...
connect to ssid MyHome, channel 6
ip:<IP_ADDRESS>,mask:<IP_ADDRESS>,gw:<IP_ADDRESS>
ip:<IP_ADDRESS>,mask:<IP_ADDRESS>,gw:<IP_ADDRESS>,dns:<IP_ADDRESS>
add 1
aid 1
station: f0:79:59:19:f6:91 join, AID = 1
station: f0:79:59:19:f6:91 join, AID = 1
LmacRxBlk:1
LmacRxBlk:1
LmacRxBlk:1
LmacRxBlk:1
LmacRxBlk:1
....
`
And then I reconnect MQTT-Broker (<IP_ADDRESS>) to  ESP-WiFi-Repeater.
Can I use this MQTT-Broker to know information?
Thank you.

Config looks okay, but the MQTT-Server doesn't seem to be connected. Could you try to setup the server in the external network (the 192.168.43.x net)? Does it work then? I will try to reproduce your setup later today...

I change  MQTT-Broker to "iot.eclipse.org"  and port 1883,
however  serial log  seem like internal network , occur line ....
MQTT:Diconnected

You have so many "LmacRxBlk:1", which means buffer shortage, maybe this is a/the problem. Do you have so much traffic during your tests?

Please try: "set mqtt_user none". If you have no username/password auth at the server, it must be explicitly "none".

I don't know why so many "LmacRxBlk:1",
But when  "set mqtt_user none"
CMD>show mqtt
MQTT host: iot.eclipse.org
MQTT port: 1883
MQTT user: none
MQTT password:
MQTT id:
MQTT prefix:
MQTT command topic: /WiFi/Router01/command
MQTT gpio_out topic:
MQTT interval: 5 s
MQTT mask: ffff

Message in serial log doesn't have "LmacRxBlk:1"  any more. as following ..
Repeater V1.4 starting

Config found and loaded
Starting Console TCP Server on port 7777
mode : sta(18:fe:34:e0:bf:ff) + softAP(1a:fe:34:e0:bf:ff)
add if0
add if1
dhcp server start:(ip:<IP_ADDRESS>,mask:<IP_ADDRESS>,gw:<IP_ADDRESS>)
bcn 100
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
cnt

connected with MyHome, channel 6
ip:<IP_ADDRESS>,mask:<IP_ADDRESS>,gw:<IP_ADDRESS>
connect to ssid MyHome, channel 6
ip:<IP_ADDRESS>,mask:<IP_ADDRESS>,gw:<IP_ADDRESS>,dns:<IP_ADDRESS>
MQTT: Disconnected
MQTT: Disconnected
....

However still happen  "MQTT: Disconnected"

Please try to set a valid prefix as well. /Test/124/ e.g.
Am 28. Juni 2017 6:18:50 nachm. schrieb ShinDaiIchi<EMAIL_ADDRESS>
I don't know why so many "LmacRxBlk:1",
But when  "set mqtt_user none"
CMD>show mqtt
MQTT host: iot.eclipse.org
MQTT port: 1883
MQTT user: none
MQTT password:
MQTT id:
MQTT prefix:
MQTT command topic: /WiFi/Router01/command
MQTT gpio_out topic:
MQTT interval: 5 s
MQTT mask: ffff

Message in serial log doesn't have "LmacRxBlk:1"  any more. as following ..
Repeater V1.4 starting

Config found and loaded
Starting Console TCP Server on port 7777
mode : sta(18:fe:34:e0:bf:ff) + softAP(1a:fe:34:e0:bf:ff)
add if0
add if1
dhcp server start:(ip:<IP_ADDRESS>,mask:<IP_ADDRESS>,gw:<IP_ADDRESS>)
bcn 100
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
cnt

connected with MyHome, channel 6
ip:<IP_ADDRESS>,mask:<IP_ADDRESS>,gw:<IP_ADDRESS>
connect to ssid MyHome, channel 6
ip:<IP_ADDRESS>,mask:<IP_ADDRESS>,gw:<IP_ADDRESS>,dns:<IP_ADDRESS>
MQTT: Disconnected
MQTT: Disconnected
....

However still happen  "MQTT: Disconnected"
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/martin-ger/esp_wifi_repeater/issues/54#issuecomment-311711173

[Current MQTT setting ]
CMD>show mqtt
MQTT host: iot.eclipse.org
MQTT port: 1883
MQTT user: none
MQTT password: none
MQTT id: qqre443434
MQTT prefix: /Test/124/
MQTT command topic: /WiFi/Router01/command
MQTT gpio_out topic:
MQTT interval: 5 s
MQTT mask: ffff

[Serial Log after reset]
Repeater V1.4 starting

Config found and loaded
Starting Console TCP Server on port 5559
mode : sta(18:fe:34:e0:bf:ff) + softAP(1a:fe:34:e0:bf:ff)
add if0
add if1
dhcp server start:(ip:<IP_ADDRESS>,mask:<IP_ADDRESS>,gw:<IP_ADDRESS>)
bcn 100
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 0 (4)
reconnect
disconnect from ssid MyHome, reason 4
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 5
cnt

connected with MyHome, channel 6
ip:<IP_ADDRESS>,mask:<IP_ADDRESS>,gw:<IP_ADDRESS>
connect to ssid MyHome, channel 6
ip:<IP_ADDRESS>,mask:<IP_ADDRESS>,gw:<IP_ADDRESS>,dns:<IP_ADDRESS>
MQTT: Connected

It's ok now  ---> "MQTT:Connected"
And then when I use Mqtt-spy  to  the Broker,
which topic for subcribe I must to set?

How to set  MQTT gpio_out topic ?  (Don't have in help)
MQTT gpio_out topic: /WiFi/ESPRouter_d8bcb5/switch

GPIO_IN and GPIO_OUT are not enabled in the precompiled FW. You have to recompile the sources with changed user_config.h to use this feature.

I can receive mqtt-message from broker already.
Thank you very much.


⚠ Samsung has degraded performance

In 0a8b4fb, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2680 ms

Resolved: Samsung performance has improved in 78ef9a1.


Both machine win-10 & win15 went dead from network monitoring website.

Both machine win-10 & win15 went dead from network monitoring website.

Both machines are up and running by restarting both machines to restore network connection.


Fixing SOURCE_QUERYBASED_LOW_WATERMARK_BACKUP_SECS no default value

LGTM

@shelocks  I am unable to merge the request because there are conflicts.

Like something mess up,sorry for that,i will open a new PR.


Error while selling

Sometimes there's an error while selling and the session abort.
[2021-07-26 11:30:23] TP or SL reached, selling 44.04 COCOSUSDT. Bought at: 0.68340000 (Price now: 0.68280000)  - -0.09% - Est: -0.03 USDT
Traceback (most recent call last):
  File "/home/jay/Bureau/Binance-Trading-Bot/Binance_Detect_Moonings.py", line 212, in <module>
    trade_crypto()
  File "/home/jay/Bureau/Binance-Trading-Bot/bot/trade.py", line 472, in trade_crypto
    coins_sold = sell_coins()
  File "/home/jay/Bureau/Binance-Trading-Bot/bot/trade.py", line 348, in sell_coins
    report_struct['report'] = REPORT
UnboundLocalError: local variable 'REPORT' referenced before assignment

The coin is sold but at next start it's still referenced in coins_bought.json and the slot is still counted as used in session_info.json.

same here
[2021-08-06 18:07:19] TP or SL reached, selling 0.735 NEOUSDT. Bought at: 44.18900000 (Price now: 44.55800000)  - 0.84% - Est: 0.27 USDT
Traceback (most recent call last):
  File "Binance_Detect_Moonings.py", line 212, in <module>
    trade_crypto()
  File "/home/fmc/dev/Binance-Trading-Bot/bot/trade.py", line 473, in trade_crypto
    coins_sold = sell_coins()
  File "/home/fmc/dev/Binance-Trading-Bot/bot/trade.py", line 349, in sell_coins
    report_struct['report'] = REPORT
UnboundLocalError: local variable 'REPORT' referenced before assignment

will look into it tmorrow

actually added REPORT = "" before any report reference at begining of sell now it should be ok


Update istio libs

Updates istio libraries to latest and makes the required changes.
Hopefully the commit messages explain each change.

/retest

/unhold


The reducer has already received the state as an argument

Hey,
I have a custom component for zooming.
const Zoom: FunctionComponent<{}> = () => {
  const [hover, onHover] = useState(false);
  const { zoom } = useStoreActions(actions => actions);
  const [, , zoomLevel] = useStoreState(store => {
    return store.transform;
  });

  const resetZoomLvl = zoomLevel - 1;

  return (
    <Zoomer direction="row" height="2rem" background="#fff">
      <button type="button" onClick={(): void => zoom(-DELTA)}>

      </button>
      <button
        type="button"
        onMouseEnter={(): void => onHover(true)}
        onMouseLeave={(): void => onHover(false)}
        onClick={(): void => zoom(-resetZoomLvl)}
        className="zoomlevel"
      >
        {hover ? 'Reset' : `${zoomLevel * 100}%`}
      </button>
      <button type="button" onClick={(): void => zoom(DELTA)}>

      </button>
    </Zoomer>
  );
};

I am extracting the zoom function from the useStoreActions and get the zoomLevel form the useStoreState. Now when i press the buttons to trigger the zoom function i get the following error: You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.
Below you see my Canvas component where my zoom is a child of ReactFlow. And my CanvasContainer is wrapped inside the ReactFlowProvider
 <CanvasContainer ref={ref}>
      <CanvasBackground />
      <ReactFlow
        elements={elements}
        onElementClick={onElementClick}
        nodesDraggable={false}
        nodesConnectable={false}
        zoomOnScroll={false}
        zoomOnDoubleClick={false}
        nodeTypes={{
          event: DefaultEventNode,
          junction: JunctionNode,
          label: LabelNode,
          phantom: PhantomNode,
          start: DefaultEventNode,
          finish: DefaultEventNode,
        }}
        edgeTypes={{
          custom: CustomEdge,
        }}
      >
        <Zoom />
      </ReactFlow>
    </CanvasContainer>

Im not sure what im doing wrong and how to fix this error.

Hey @emielwit
you found a bug. I will try to figure out what is going on here.

Should work with v.4.3.1


Check for opcache.enable_cli and apc.enable_cli

Q
A

Issue Type
Feature Request

Deployer Version
next

Description
Check for enabled opcache.enable_cli and apc.enable_cli. Inform user to disable these config.

Can I take this issue?

Yes. Will be perfect.


Actually track entity spawns during inventory clicks.

Fixes SpongePowered#1193.
Test code:
package jbyoshi.sponge.test;

import org.spongepowered.api.event.Listener;
import org.spongepowered.api.event.item.inventory.ClickInventoryEvent;
import org.spongepowered.api.item.ItemTypes;
import org.spongepowered.api.item.inventory.transaction.SlotTransaction;
import org.spongepowered.api.plugin.Plugin;

@Plugin(id = "testspongecommon1193")
public class TestSpongeCommon1193 {

    @Listener
    public void onClickInventory(ClickInventoryEvent event) {
        if (event.getTargetInventory().getClass().getName().endsWith(".ContainerFurnace")) {
            for (SlotTransaction transaction : event.getTransactions()) {
                if (transaction.getOriginal().getType() == ItemTypes.GLASS) {
                    event.setCancelled(true);
                    break;
                }
            }
        }
    }
}

To test, smelt some sand and try to remove the glass. Be aware that smelting glass naturally does not always give XP; try removing it repeatedly.

Fixed a bug where XP would not spawn at all.


research: deterministic source maps

Looks to me like the webpack paths object might differ between CF Pages and Fleek. Draft PR to test.

@mrnerdhair closing this for housekeeping, you're welcome to reopen if required.


fix sharedInformerFactory register

sharedInformerFactory should register resource before call sharedInformerFactory.Start()
I get logs Node lister returned empty list, now fetch directly

/approve
/lgtm
@xiaoanyunfei thanks for noticing this.


Circular dependencies mgmt to pass madge checks

Fixes #
Exported constants from core/selection/style/commit-style.ts to a separate constants.ts file.
Updateв imports in src/modules/uploader/helpers/process-old-browser-drag.ts not to import from index, but directly from sibling modules.

Thank you!


[Bug] [Workflow Definition] The "launch configuration" of a workflow definition is lost in certain situations, such as after switching pages

Search before asking

[X] I had searched in the issues and found no similar issues.

What happened

What you expected to happen
Configure retention
How to reproduce
None.
Anything else
None.
Version
dev
Are you willing to submit PR?

[ ] Yes I am willing to submit a PR!

Code of Conduct

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

I will fix it.

This problem requires the assistance of the back-end partners. @zhongjiajie @caishunfeng

will take a look today

It is expected behavior, just like temporarily overwriting the parameter with use in. But we should and env and wariming group when we save our workflow, so I change it from bug into improve here

remove stale


Erratic screenshots (rectangular area not 'painted'). Potential bug. Only happens with headless=true

Steps to reproduce
Tell us about your environment:

Puppeteer version: 0.11.0 (also on 0.10.x)
Platform / OS version: Macbook Pro Retina early 2015 / OS X Yosemite 10.10.5
URLs (if applicable): http://bbc.com

What steps will reproduce the problem?
Running the following snippet wil reproduce the problem. NOTE: the problem is erratic; sometimes it will exhibit the correct behavior.
const puppeteer = require('puppeteer');

(async() => {

  const browser = await puppeteer.launch({ headless: true });

  const page = await browser.newPage();
  await page.goto("http://bbc.com");
  await page.evaluate(() => window.scrollBy(0, document.body.clientHeight));
  // await page.setViewport({ width: 1280, height: 1024 }); //uncommenting seems to expose the erratic behavior more often
  await page.screenshot({ fullPage: true, path: 'screenshot.png' });

  await browser.close();

})();

What is the expected result?
Doing a fullpage screenshot should result in a complete screenshot of the page without rectangular areas that are not 'painted'.
What happens instead?
There's an erratic issue with the produced screenshot, clearly visible at the bottom of the screenshot (the footer of bbc.com homepage). It appears as if chrome doesn't do a complete paint, which results in a rectangular area to be entirely white.
Note: this only happens when using {headless:true}. Doing {headless:false} produces the correct result.
I included 2 screenshots, please check the bottom of the screenshots for the clear difference. To be clear: I'm NOT concerned with images that not have been loaded. Also: using {headless: true} produces different results each time. In about 10% of cases I'm getting a correct result. The other 90% differ from a screenshot as shown (a rectangular area missing from the paint) to the footer not displayed at all.
I have not seen this with any other page and I've checked quite a few. Looking at the bbc.com source, I can't see a clear reason why this specific one is failing.
Screenshot showing the CORRECT behavior ({headless:true: false})

Screenshot showing the ERRATIC behavior ({headless:true})

Showing only the footers:
correct {headless: false}

incorrect {headless: true}

FWIW, window.scrollBy(0, document.body.clientHeight) would be more effective.
> document.documentElement.clientHeight
413
> document.body.clientHeight
7653

@vsemozhetbyt , yep you're correct. Doesn't make a difference for this problem though.

I'm having exactly the same issue at the moment. Tested both v0.11 and 0.12-alpha.

probably similar to #477

Taking multiple clipped screenshots and stitching them together as per https://github.com/GoogleChrome/puppeteer/issues/933 seems to have solved things.
Got good results using sharp  for stitching

Taking multiple clipped screenshots and stitching them together as per #933 seems to have solved things.

This seems to be giving page enough time to render.
Dupe of #477.

@aslushnikov I'm satisfied with the workaround but still curious to the underlying reason (and a potential way to fix properly):

This seems to be giving page enough time to render.

Is it that the chrome is rasterizing the screen at a certain frames/sec but the screen it too large for the cpu to keep up or something?

@gebrits rasterization is done in chunks, and we don't wait enough time for rasterizer to complete


ios simulator app crashing with react-native-ble library installed

I created a RN .4 project with installing the react-native-ble library installed. I made all the updates to the included library. The entire app builds successfully.  However, everytime I launch the IOS simulator with the react-native-blu library linked to the simulator it crashes. I see no error messages. Any insight the reason this maybe be occurring.
Moses

RNBLE isn't supposed to work with your simulator. It needs to have access to a real phone, your simulator cant access the bluetooth capacities of your computer.

got it.