Breaking api change between minor versions

The v1.3.0 release changed the type of a number of public fields in public structs to use Pointer instead of String. This caused my docker builds to start failing with errors that didn't show up when compiling outside of docker, since I had v1.2.0 cached locally. Please consider either reversing this change or bumping the major version

Yanking the release and postponing the release of any breaking changes until v2 seems most reasonable option to me.

Ouch. I had some breaking changes in main.
Okay, I re-released the fix on top of the 1.2.0 as 1.4.0 and yanked 1.3.0. Let me know if it works!

Ouch. I had some breaking changes in main.
Okay, I re-released the fix on top of the 1.2.0 as 1.4.0 and yanked 1.3.0. Let me know if it works!

Works as expected, thanks!!


Add --from-private-key option to keys generate command

Closes https://github.com/onflow/flow-cli/issues/505

For contributor use:

[X] Targeted PR against master branch
[X] Linked to Github issue with discussion and accepted design OR link to spec that describes this work
[X] Code follows the standards mentioned here
[ ] Updated relevant documentation
[X] Re-reviewed Files changed in the Github PR explorer
[ ] Added appropriate labels

Thank you, this is great. I was just thinking if it makes sense for this to be under the flow keys generate command as it's not really generating a key, but deriving a public key. Maybe a command flow keys derive <private-key> could be better.

Sure I will update the PR, it makes more sense like that


Represent vector using four fields and not one list

It is more performant, which is important when we create a lot of vectors, which is common in games, especially if you remember that every operation on vector creates a new vector.
It is also nicer (IMHO), and would allow us to use short field representation if https://github.com/wren-lang/wren/issues/849 will be accepted.
The reasons it's more performant:

Lists have a backing storage, which is storage separately, meaning more memory + more GC + more indirection. All affect performance, and not for good.
Lists must do bounds checking every time we access an element. Fields don't.
Edit: Lists also call methods in order to access the element ([_]). We already have a method call for accessing each field, as we access their getters and not directly the fields. We can access the fields, but I afraid that we would need to change that if the above referenced issue will be accepted (because we won't have a way to directly refer the field then). Method call for every property access hurts performance. Sixteen method calls (for each vector (this and other)) -> for each field (4) -> a getter -> a list subscript) for operations like addition is even worse. We can reduce them to half.

The reason Vector was implemented with a List was so that we could have for-loop iteration of values of a vector, potentially for easier matrix multiplication later.

We can't do that either because the user doesn't have access to the _values field.
And even if we'll implement matrix multiplication in the future, I don't think the performance degrade (I didn't benchmark but it should be fairly significant), is worth the ease of implementation of one feature for the game engine.

I have a tendency not to expose things as a public API until I'm sure it is an API I want to support, which is why that values variable is currently unavailable.

This is why this tendency is good - you can do things like refactoring if they're proved to be profitable 😄.


You need Array#starts_with? and Array#ends_with?

Hi!
To add a new feature, I would like to conduct a survey. You need this feature?
a = [1, 2, 3, 4]

a.starts_with? [1, 2] # => true
a.starts_with? [1] # => true
a.starts_with? [2] # => false
a.starts_with? 1 # => true
a.starts_with? 2 # => false

a.ends_with? [3, 4] # => true
a.ends_with? [4] # => true
a.ends_with? [3] # => false
a.ends_with? 4 # => true
a.ends_with? 3 # => false

PR: #7356

What would be a use case for this?


[Question] mdxjs error with Days: [[2023-06-22]] <== [[2023-06-23]] ==> [[2023-06-24]]

Hi,
First of all: very cool project! 😃 It's very easy to set up with an existing Obsidian vault.
I need help with my daily notes in Obsidian. I have a link to the current, previous, and next days and I use <== and ==> as arrows. However, when I try to visualize these notes with flowershow I encounter the following error:
Server Error
Error: [next-mdx-remote] error compiling MDX:
Unexpected character `=` (U+003D) before name, expected a character that can start a name, such as a letter, `$`, or `_`

  11 | ---
  12 |
> 13 | Days: [[2023-06-22]] <== [[2023-06-23]] ==> [[2023-06-24]]
     |                       ^
  14 | Week: [[2023-W25]]
  15 |

More information: https://mdxjs.com/docs/troubleshooting-mdx

I understand it's a problem with mdx, as they mention on the troubleshooting page:
The reason for these errors is that JSX has a very strict grammar and expects tags to be valid. There are different solutions depending on what was expected. Please read the error message carefully as it indicates where the problem occurred and what was expected instead.

I have two questions/points:

Is it possible to solve this without editing all my daily notes?
If not, do you have any recommendations on how to do that?

Thanks in advance!

@marcbenedi i also want this fixed. The best way would be to pre-process markdown to replace => or ==> with something like ⟹ or similar. this could even be a crude regex.


Update the multi text variable UI

#2884  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @nickgraz and the rest of your teammates on  Graphite


Revert "Strip debug symbols from App.framework for non-debug builds (#22245)"

Reverts #22245.
This reverts commit eda228404ce9bd0ddfd1594b45836f19eea4a517.
App Store upload with symbols doesn't work with this. :(

Superseded by https://github.com/flutter/flutter/pull/22540.


Issue Converting TensorFlow Model to Core ML Model

I am running the following commands and getting this result.

This is happening because there is no tensor named "softmax:0" (provided output feature name) in the TF graph.

Thanks Aseem! So what will be the correct syntax for converting TensorFlow model to Core ML model.

The syntax to call the converter is correct. You just need to find the correct name of the output tensor in your TF graph and use it in your function call.
You could either get it form the training script you used or you can try using the script "utils/inspect_pb.py" in this repo which prints a text summary of the TF graph (all tensor names). You can also use tensorboard to visualize the graph which can help you in finding the output name ("utils/visualize_pb.py").

Thanks! I am able to generate the text summary file but I am still unsure what represents the TF graph and what I am supposed to put in output_feature_names. Here is the screenshot of the text summary file:

I also tried to visualize the graph but the visualize is just stuck and not doing anything. As shown in the screenshot below:

You have to open up the link in a web browser (in this case http://Mohammads-MBP.localdomain:6006) to visualize.
The output you need depends on which tensor you want from the graph. If you scroll down towards the end of the text file, you should see the tensors towards the end of the graph (nodes close to the sink node of the graph). Maybe you want the output of the Softmax op at the end.

I opened that link and there is nothing there. Take a look at the following screenshot below:

Also, the summary text file contain the following at the end of the file:

Okay maybe I was not clear in my earlier explanation. The text file lists all the ops present in the TF graph and numbers them 1, 2, 3 etc. At the end of the file these are just the histogram counts of the ops.
For each op the following are listed:

op name
op type
input names and shapes
output names and shapes

Ignore the histogram op counts at the end of the file. Instead look at the last few op descriptions. Search for the
"op type = ( Softmax )".  For that op find the output name. Remove the "import/" from that name. That is the name of the Tensor that you are interested in and that you should pass to the converter.

Thank you so much for your continued help! I was able to convert the model to Core ML. One thing I realized is that for Core ML input parameters for the model is a multi dimensional array of Doubles. I was expected it to take an image of 244 X 244 size so it can process the image and give me predictions. I am using the Inception V1 model located at (https://storage.googleapis.com/download.tensorflow.org/models/inception_v1_2016_08_28_frozen.pb.tar.gz)
Thanks again

Great!
You can find the description of the convert function arguments at the end of the file "tfcoreml/_tf_coreml_converter.py". In particular, argument "image_input_names" can be used to mark inputs as images. In the inception model screenshot you attached, the input name would be "input:0" (output of the op type Placeholder). You can also provide image biases and scales as additional arguments.

Thanks @aseemw, your explanation make it work for me

import tfcoreml as tf_converter tf_converter.convert(tf_model_path = 'output_graph.pb',                      mlmodel_path = 'my_model.mlmodel',                      output_feature_names = ['final_result:0'],                      class_labels = 'output_labels.txt',                      image_input_names = ['input:0 : (1, 224, 224, 3)'] )
is this script correct ?

is this the correct syntax :
`
import tfcoreml as tf_converter
tf_converter.convert(tf_model_path = 'output_graph.pb',
mlmodel_path = 'MyModel.mlmodel',
output_feature_names = ['final_result:0'],
class_labels = 'output_labels.txt',
image_input_names = ['input:0'] )
`

is this correct ?
import tfcoreml as tf_converter tf_converter.convert(tf_model_path = 'output_graph.pb',                      mlmodel_path = 'MyModel.mlmodel',                      output_feature_names = ['final_result:0'],                      class_labels = 'output_labels.txt',                      image_input_names = ['input:0'] )

is this correct code ?
import tfcoreml as tf_converter
tf_converter.convert(tf_model_path = 'output_graph.pb',
mlmodel_path = 'MyModel.mlmodel',
output_feature_names = ['final_result:0'],
class_labels = 'output_labels.txt',
image_input_names = ['input:0'] )

Here is what my final script looks like:
import tfcoreml as tf_converter
tf_converter.convert(tf_model_path = 'inception_v1_2016_08_28_frozen.pb',
mlmodel_path = 'my_model.mlmodel',
output_feature_names = ['InceptionV1/Logits/Predictions/Softmax:0'],
image_input_names = ['input:0'])
It does produce a Core ML model but that model does not look correct. The model is missing the labels in the prediction and class labels also.
Is there a complete example available from Google where they show how to convert a TensorFlow model to a Core ML model and then import that model into Xcode and then also show how to use it. I can import the generated model but the model does not have any class labels or anything that I can use.

Here is the error I get if I try to add class_labels.

i guess i got the same error, but when i updated the code base for tfcoreml its gone. Please check the closed issues : KeyError: u'classLabel' setting class_labels

im using following script
import tfcoreml as tf_converter
tf_converter.convert(tf_model_path = 'output_graph.pb',
mlmodel_path = 'MyModel.mlmodel',
output_feature_names = ['final_result:0'],
class_labels = 'output_labels.txt',
image_input_names = ['input:0'],
image_scale=2/224.0, red_bias=-1, green_bias=-1, blue_bias=-1
)
Do you know how to add 'classLabelProbs' in output

I think you should be able to use "predicted_probabilities_output" argument. Kindly see the description of all the arguments at the end of the file https://github.com/tf-coreml/tf-coreml/blob/master/tfcoreml/_tf_coreml_converter.py

I just tried converting below model
https://github.com/vanhuyz/CycleGAN-TensorFlow/releases/download/v0.1-alpha/apple2orange.pb
But show error as 'ValueError: Graph has cycles.'

@devajith Yes this is happening because the TF graph has cycles. CoreML supports only acyclic graphs. Recurrent nodes have a high level acyclic representation in CoreML, unlike TF.
Currently, the converter has these limitations).
Most of the times the cycles are part of some kind of recurrent operation. Hopefully in the future the converter will be updated to recognize this patterns and map them to the high level CoreML abstraction.
For now, I'd advise you to look at this example. The idea is that if you have a TF graph with cycles, you can use the graph transform tool utilities to extract acyclic subgraphs and convert those to CoreML.

@aseemw which transform tool utilities i need to use ? i could not figure out which part of that example is doing the extraction of the acyclic subgraph.? can you help

In the example there is this function call to "strip_unused_lib.strip_unused()". Two of the arguments to that function call are "input_node_names" and "output_node_names". After this call only the subgraph starting at "input_node_names" and ending at "output_node_names" is preserved.
You might need to analyze the graph a bit before you decide which sub graph to extract. Tensorboard is a good option to visualize the TF graph.

Do i need to remove the subgraph 'F' to remove the cyclic issue ?
The code i used for extraction is given below :
import urllib, os, sys, zipfile
from os.path import dirname
import numpy as np
import tensorflow as tf
from tensorflow.core.framework import graph_pb2
tf_model_path = 'orange2apple.pb'
with open(tf_model_path, 'rb') as f:
serialized = f.read()
tf.reset_default_graph()
original_gdef = tf.GraphDef()
original_gdef.ParseFromString(serialized)
with tf.Graph().as_default() as g:
tf.import_graph_def(original_gdef, name='')
from tensorflow.python.tools import strip_unused_lib
from tensorflow.python.framework import dtypes
from tensorflow.python.platform import gfile
input_node_names = ['ExpandDims']
output_node_names = ['output_image']
gdef = strip_unused_lib.strip_unused(
input_graph_def = original_gdef,
input_node_names = input_node_names,
output_node_names = output_node_names,
placeholder_type_enum = dtypes.float32.as_datatype_enum)
Save the feature extractor to an output file
frozen_model_file = 'test.pb'
with gfile.GFile(frozen_model_file, "wb") as f:
f.write(gdef.SerializeToString())

Hi, @devajith,
The cycle is in the map_4 subgraph. There is a while loop inside it.

can i strip that. ? is it going to affect the working of that model.?

I don't think you're able to strip it. TensorFlow has control flow ops like map and while to change the graph execution path depending on variables; CoreML on the other hand does not have support of such ops.

@aseemw  I am using a custom trained faster rcnn inception v2 model ,when i am converting to coreml, should my output feature names be the last op i have in my my model summary? or the value of the last softmax layer i find?
this is the end of my model summary.

text_summary.txt
this is my model summary

@aseemw i get this error

I checked this link : https://hackernoon.com/integrating-tensorflow-model-in-an-ios-app-cecf30b9068d

Hi @noorhashem
any luck on converting the faster rcnn model?

Hi @noorhashem
I also want to convert the faster rcnn but get 'Graph has cycles' error.

@azamsharp
@aseemw
I'm using https://github.com/azamsharp/TensorFlowToCoreML.
But the Model I created is a Model that was once created with Tensorflow. But it's not in the frozen form. Please tell me how would I convert the Object Detection API Model to .mlmodel.

@mbenami no and i used tensorflow for iOS instead

@azamsharp  Thank you, I'll check this one, also check tensorflowLite for iOS if you can manage to convert the model to .lite format and deploy it on iOS instead of the .mlmodel.

is it possible to convert TF graph with cycles using coreml3 ?


This directive is awesome !!!

thanks a lot ! it's amazing...just bower it and works, really works...
(sorry to open an issue for this, but i was feeling so happy, i didn't know where to thank you else...)

:+1:


Added ContinueWatching and WifiManager plugins

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


Issue #50: boolean functions - 3

Summary
Adds test functions with bool return statements rather then calling domain_error like existing check_* functions. These functions are being deployed to help improve developer productivity when building new features in stan-dev/math.
https://github.com/stan-dev/math/issues/50
Complements an earlier PR with further development in ./prim/mat/err/ and ./prim/scal/err and related test files. There is another batch still in progress.
Once this phase is completed a review of the check_* functions will commence looking into incorporating the is_* functions in a way which improves those domain_error calling functions messages.
I believe that this PR completes the objectives of Issue #50.
Some of the files touched in this PR may not be directly related to the is_* functions being created and are limited to minor syntax alterations.
Tests
Each function included has its own test file modeled off the existing tests used for the check functions. In my environment all of these replicated tests pass as expected.
Side Effects
None applicable.
Checklist

[x] Math issue #(50)

[x] Copyright Holder: Oliver Dechant

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:
Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

[x] the basic tests are passing (make doxygen, make test-headers, ./runTests.py tests/unit/math/)

[x] the code is written in idiomatic C++ and changes are documented in the doxygen

[x] the new changes are tested

I'm not clear as to why this test is causing Jenkins to fail. The culprit is_not_nan passes the given test case on my computer. Additionally it passed and was merged in the prior PR #1187. So none of the new includes in this batch should be influencing its functioning.
The only thing I notice now in is_not_nan.hpp is the extraneous #include <stan/math/prim/scal/meta/is_vector_like.hpp> which should be removed but I don't suspect that is causing problems with Jenkins.
Here is the test case
#include <stan/math/prim/mat.hpp>
#include <gtest/gtest.h>
#include <limits>

TEST(ErrorHandlingMatrix, isNotNanEigenRow) {
  stan::math::vector_d y;
  y.resize(3);

  EXPECT_TRUE(stan::math::is_not_nan(y));
  EXPECT_TRUE(stan::math::is_not_nan(y)); <-- this test fails

  y(1) = std::numeric_limits<double>::quiet_NaN();
  EXPECT_FALSE(stan::math::is_not_nan(y));
  EXPECT_FALSE(stan::math::is_not_nan(y));
}

It's tempting to comment out the test but I doubt that is a good solution.

Can we really be sure that
stan::math::vector_d y;
y.resize(3);

will never have NaNs? I dont think we want uninitialized values in tests. There were (or may still be) some cases of uninitalized vectors that were causing random errors, so we should avoid this.

I agree that we cannot. The error is of my own making.
What was confusing was that I reviewed the last commit and there is only one is_not_nan.hpp which is in /prim/scal/err/.
The error for the test case is that there also exists one new test file: is_non_nan_test which was based on check_not_nan. Both refer to respective /mat/err/[*].hpp files which do not exist! So I was confusing the merged is_not_nan from scal and the one from mat.
As a matter of fact there exist a couple more check tests [0] which do not have corresponding .hpps and they seemed innocuous so I ignored them and didn't intend to have them replicated as is tests but overlooked one.
[0] https://github.com/stan-dev/math/blob/develop/test/unit/math/prim/mat/err/check_not_nan_test.cpp
Something seems to have been caught by Jenkins for the is copy of one of these, specifically the is_not_nan_test.
Since there is no proper calling function it is right to delete the blocking test here.  Why exactly it blocked the build while the others do not I can't guess.
Should the other redundant but innocuous test files be removed? They may still be useful at some point.

Is @rok-cesnovar going to review this or should I?
We're trying not to double-review things so PR authors get consistent feedback.

I would suggest you do it Bob. If I am not mistaken you also reviewed the previous boolean functions PRs, so that might help with consistency.

OK, will do.

I'm not sure why Jenkins did this after a minor typo edit to a previously and now still passing test.
+ make -jnull test-headers
make: the '-j' option requires a positive integer argument

Otherwise I'm certain this request should build. Regardless I just merged upstream to restart the CI tests.

Thanks for taking on this massive project.
I'm running out of steam about halfway through here and am hoping you can apply some of the general principles throughout and I can just take a pass through the whole thing again.
It might be easier going forward to use smaller pull requests to iron out general principles before applying them everywhere like this. I feel bad asking for so many changes at this late stage.

It's been a great opportunity to learn about the structure of a large C++ project. As of today I have a last final exam Tuesday morning and I need to allocate the bulk of my weekend towards that so I hope to make incremental progress later into the nights (if at all) until then.
There is certainly a lot of repetition here and I intended this to be one of three smaller PR segments but for whatever reasons this ended up including quite a lot of changes. It should be possible to split this into two PRs.
I have no problem making whatever changes you need to feel comfortable about code quality. It's been your review and suggestions which help me the most. I responded to @syclik and asked for a project that wasn't time dependent so I've appreciated the flexibility to pick away at this over the past 3 months of my sophomore year. I have no problem continuing for however much longer is necessary for this to be beneficial to the developer team and consistent with the quality of the rest of the project.

Great.  No rush on our side to get this done.  But let us know if you want to bail at some point and we can find someone else to finish it.

@serban-nicusor-toptal http://d1m1s1b1.stat.columbia.edu:8080/blue/organizations/jenkins/Math Pipeline/detail/PR-1202/5/pipeline

@ode33 Hey, can you push a commit now ? ( just do a new line ) .
Thanks!
PS: Jenkins went through a migration process

@serban-nicusor-toptal Yes I can later tonight on my desktop. Thanks!

I just merged... hopefully that'll kick off continuous integration again and we can move forward from there.

It looks like this fell behind some other changes to the library. I'll have to update a few things before this is ready.

I am closing this PR. @ode33 just reopened it if you find the time to finish it. Thanks!


Fix travis errors

Fixes #30

No, I did it by hand, using what I think is a rather common codestyle to get shorter lines. Do you have any specific examples of code you think became less readable because of my edits?

Regarding the missing py3 compat, wouldn't it be better to remove it from the travis.yml as well then? Now it's making the build fail.

@ErwinJunge. Yes. I think the same too. You can remove it from the .yml as of now.

Great job @ErwinJunge Can you squash all the commits into one? Do this and we can proceed to merge it. :smile:

Don't forget to add your name to CONTRIBUTORS.md too. @ErwinJunge

@rohithasrk In addition to making the changes to the codestyle, I also made some notes. Perhaps you'll want to turn these into more issues?

Inconsistent use of " vs '
Using + to compose strings instead of u''.format
Failure to use unicode literals (u'')
Catchall excepts

Thank you @ErwinJunge :smile:

Thanks for the quick responses @rohithasrk, it was fun working on this :)


Compressed Shuffle (Arrow-IPC compression)

Upstream issues:
[TODO] Rust side: https://github.com/apache/arrow-rs/issues/1709
[Partly Finished?] Java side: https://issues.apache.org/jira/browse/ARROW-8672

IPC block-based compression is supported now. we can still switch to column-based compression if it achieves better compression and performance.

Great work! Is that possible to report a new benchmark results for the latest master? @richox

We could always explore buffer based compression when it gets direct support from arrow-rs later.

Great work! Is that possible to report new benchmark results for the latest master? @richox

we got some performance issue when running on STS with small memory and broadcast join enabled. i guest we have to implement native BHJ before we get a better benchmark result.

we implemented a custom designed format for serializing record batches in the latest version. arrow-ipc format is no longer used because we found some performance issues while compressing with low level zstd.


Incorrect Month Label when Toggling Mode from "multiple" to "range" (and "showMonths" is in the calendar's config)

Bug Reproduction Link
https://jsfiddle.net/rocket321/3sm4qubj/

Click the "Toggle Calendar Mode" button to see the bug.

Your Environment

flatpickr version used: 4.5.0
Browser name and version: Chrome Version 67.0.3396.87
OS and version: Windows 10

Bug Description
When a calendar is configured to "showMonths" (1 or more), and the calendar's configured "mode" is dynamically toggled from "multiple" to "range", the month's label on the calendar displays the incorrect month.
Note that the month is still correct (from the calendar days perspective), the month is just labeled incorrectly.
Potential Bug Fix
   function buildMonths() {
    clearNode(self.monthNav);
    self.monthNav.appendChild(self.prevMonthNav);

    // Bug Fix: Start
    if(self.config.showMonths){
      self.yearElements = [];
      self.monthElements = [];
    }
    // Bug Fix: End

    for (var m = self.config.showMonths; m--;) {
      var month = buildMonth();
      self.yearElements.push(month.yearElement);
      self.monthElements.push(month.monthElement);
      self.monthNav.appendChild(month.container);
    }

    self.monthNav.appendChild(self.nextMonthNav);
  }

I believe this bug is also causing this behavoiur when the minDate and maxDate are dynamically changed:
https://jsfiddle.net/wxLb6m4n/725/


Problem with import

Is there a way to insert the library in a typescript module base project.
I have tried many things like :
import AColorPicker = require('a-color-picker');

But I alway get an empty object.

Hi @valentinbdv,
install the version 1.0.6 and use this line of code to import the library in your module
import * as AColorPicker from 'a-color-picker';

Works great!
Thanks a lot for the update!


Implement end-of-word line breaks for right-to-left text in TextFields

Imagine an Arabic string of text of this structure:
one two three four five
Imagine a new text field, that can fit "one two thr" on the first line before running out of horizontal space. If I put the above text into this text field, it will read something like this:
evif ruof
eerht owt eno
This is because by default, text fields compose themselves left-to-right.
Using the following code, I'm putting the text field into "Arabic RTL mode" (please, correct me if this is wrong or insufficient):
var textLayout = new lime.text.TextLayout();
textLayout.direction = RIGHT_TO_LEFT;
textLayout.script = ARABIC;
Reflect.setField(Reflect.field(textField, "__textEngine"), "__textLayout", textLayout);
If I set my text field's text to the string above, I will read something along these lines:
five four
three two one
This is because the line breaking logic assumes that it is working with left-to-right text. This logic operates on the positions of space characters (" ") in the string, so if I replace all the space characters with some other space-like character, I can dodge the line breaking logic to some degree:
one two thr
ee four five
Unfortunately, without "real" spaces, the line breaking logic cannot push the word "three" to the next line.
In short: we need a way to write multiline right-to-left text whose line breaks do not occur in the middle of words.
Attached are screenshots of Arabic and Farsi, rendered in macOS TextEdit and in OpenFL on iOS, respectively. The orange scribbles indicate differences between the line breaks that illustrate the above problem. Also attached is a zipped-up project that demonstrates these problems.

Non-Latin Languages.zip

I can look at this once one of my other text PRs get merged. I had to break and redo all word wrapping in that one, and RTL might require that again :P

Just posting some related links for the sake of convenience
https://github.com/openfl/openfl/issues/1853
https://github.com/openfl/openfl/commit/a29ee1924facb8448063b1c77fd083d1a2c1a888#diff-8b0e91bc5c0fe12532fb434550b23f44
https://github.com/HaxeFlixel/flixel/issues/2096

For my info, word wrapping is the exact same right, just that it’s RTL?
I’ll have to check, but Flash might only break on actual spaces (char code 32) and not kinda-spaces. One is literally called non-breaking space. Maybe it deals with certain ones and not others.
I’ll have to do some testing, but I am an expert at this by now. Maybe it doesn’t affect my other changes.

Lars, are all of those things you mentioned Lime things? That's separate from word-wrapping, which is what I'll try to focus on.
(Omg I opened the files in VScode and pressing the right arrow key made the cursor move left through the text. This will be interesting...)

The things I'm mentioning aren't specific to lime -- it's part of the
complicated rules of how RTL scripts work in real life.
See here for some details, and examples. The TL;DR is that a lot of "RTL"
languages are actually "bidirectional", ie, depending on the context, you
could expect the text to run left to right, or right to left, for a
specific subset of characters, and it's all context-dependent:
https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/user-interface/bidirectional-support
On Thu, Jun 7, 2018 at 8:23 PM, Nick<EMAIL_ADDRESS>wrote:

@Rezmason https://github.com/Rezmason … is this incorrect? I don't see
half of these words in your screenshots, so I'm not sure what I'm looking
at. It displays the exact same as the text is written in your example:
[image: image]
https://user-images.githubusercontent.com/5033927/41134137-d1940b7e-6a98-11e8-81da-eb28ddc49a73.png
This is HTML5, Neko hits an infinite loop somewhere that I have to find...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/openfl/openfl/issues/1905#issuecomment-395616060, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAtG-LrZAqUkZCYZXonCJC9OEHBv_Wafks5t6dH0gaJpZM4USBbc
.

--
www.fortressofdoors.com -- Games, Art, Design

Mmm the fake-spaces were causing the string to not format properly. I deleted that line, and now I have something that I can work with.

I need some test cases that are pure Arabic/Farsi, as the core problem here isn't clear with the English examples and fake spaces. It sounds like words print in backwards order, and if so, I might have fixed that unrelated to the line-breaking logic.

@MSGhero Thanks for doing this.
I don't speak Arabic but I can provide simple (and lengthy) test cases. Please let me know what you need (eg. screenshots, phrases, text...)

If you can send me the text plus a screenshot of how it looks like, that’d be great. One short and one long is probably sufficient. OpenFL/Lime can’t really deal with bidirectional text yet I don’t think, so no “iTunes” and no numbers preferred.
I think I got it working minus JUSTIFY, but I want to check against a real example. Thanks!

Gladly. Attached are two very short sames.
The first, is two words: بسم الله

The second is fairly lengthy (let's say a paragraph):
اللَّهُ لَا إِلَٰهَ إِلَّا هُوَ الْحَيُّ الْقَيُّومُ ۚ لَا تَأْخُذُهُ سِنَةٌ وَلَا نَوْمٌ ۚ لَهُ مَا فِي السَّمَاوَاتِ وَمَا فِي الْأَرْضِ ۗ مَنْ ذَا الَّذِي يَشْفَعُ عِنْدَهُ إِلَّا بِإِذْنِهِ ۚ يَعْلَمُ مَا بَيْنَ أَيْدِيهِمْ وَمَا خَلْفَهُمْ ۖ وَلَا يُحِيطُونَ بِشَيْءٍ مِنْ عِلْمِهِ إِلَّا بِمَا شَاءَ ۚ وَسِعَ كُرْسِيُّهُ السَّمَاوَاتِ وَالْأَرْضَ ۖ وَلَا يَئُودُهُ حِفْظُهُمَا ۚ وَهُوَ الْعَلِيُّ الْعَظِيمُ

Is this sufficient?

Thanks for taking this on. Let me know if you need anything else from my side.


How to change class balance parameters according to input size

Hi, thank you for your great work on domain adaptation!
The origin input image is 1024512, but now I want to train on higher resolution, like 19201080.
How should I change the class balance parameters like max_value and 6464n.
In my opinion, it will be better to use ratio threshold instead of a hard assigned number like 64 like this:
for i in range(self.num_classes):
count[i] = torch.sum(labels==i)
if count[i]/(nhw) < 1/128.0: #small classes, original train size is 1024512
weight[i] = self.max_value
and 6464/(5121024) = 1/128
But I get worse results than default settings trained with input size (1024512).
Is there anything that I missed?
Any help will be appreciated.

Hi @layumi , thank you for your reply. I have a more detailed question.
If I get this kind of pseudo, should I use a larger max_value or a smaller one?
It seems that small objects is good but large object get worse

@qimw
It is hard to say. You may try more regularisation methods, such as auto-augmentation (I wrote in my code but not used in the final model. It sometimes helps. ).
Besides, you could use the average score of the multi-scale inputs when inference.

Thank you for your reply~

Hi, I have another problem. Why did you crop images to 512x256 when finetune on pseudo. Is it better than use 1280x640?

Due to the GPU memory limitation, this choice is to enable the large batchsize, which could help updating the weights of BatchNorm Layer.

Thanks a lot~


java command line params error

compose
      JVM_DD_OPTS: "-Dfml.queryResult=confirm"
      JVM_XX_OPTS: "-XX:+AggressiveOpts"

real command java -XX:+AggressiveOpts -Xms1g -Xmx4g -Dlog4j.configurationFile=/data/log4j2.xml -D-Dfml.queryResult=confirm -jar forge-1.15.2-31.2.21.jar nogui
-D-Dfml.queryResult=confirm shall be -Dfml.queryResult=confirm

my bad

@itzg JVM_DD_OPTS don't need -D bug why JVM_XX_OPTS needs -XX?

Yes, in hindsight that’s an unfortunate confusion due to the similarity in names. The XX one long pre-dated the other and simply existed since the JVM requires those options before -D and others.

...also the intent for XX one is to convey any of the low level JVM options like -agent and others so it can’t do the auto-prefixing like the DD one.


Unit test Floating Point Exception

Building from source and running on an M1 I am getting a floating point exception from the Negatie slice and ascending bounds portion of the test_array.TestArray.test_slice_negative_step unit test. All tests pass when commenting the following lines out:
# Negatie slice and ascending bounds
b_np = a_np[0:20:-3]
b_mx = a_mx[0:20:-3]
self.assertTrue(np.array_equal(b_np, b_mx))

Excerpted exception details:
Exception Type:        EXC_ARITHMETIC (SIGFPE)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Termination Reason:    Namespace SIGNAL, Code 8 Floating point exception: 8

Thread 0::  Dispatch queue: com.apple.main-thread
0   ???                           	    0x7ff89ac8e9a8 ???
1   libsystem_kernel.dylib        	    0x7ff80b0430fe __psynch_cvwait + 10
2   libsystem_pthread.dylib       	    0x7ff80b07f758 _pthread_cond_wait + 1242
3   libc++.1.dylib                	    0x7ff80afbc1e2 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
4   libc++.1.dylib                	    0x7ff80afbca51 std::__1::__assoc_sub_state::__sub_wait(std::__1::unique_lock<std::__1::mutex>&) + 45
5   libc++.1.dylib                	    0x7ff80afbcaba std::__1::__assoc_sub_state::wait() + 46
6   libmlx.dylib                  	       0x10afa5648 mlx::core::eval(std::__1::vector<mlx::core::array, std::__1::allocator<mlx::core::array>> const&, bool) + 4520

Thread 11 Crashed:
0   AGXMetal13_3                  	    0x7ffa243eec5b AGX::ComputeService<AGX::G13::Encoders, AGX::G13::Classes, AGX::G13::ObjClasses, AGX::G13::EncoderComputeServiceClasses>::executeKernelWithThreadsPerGridImpl(eAGXDataBufferPools, MTLSize, MTLSize) + 363
1   AGXMetal13_3                  	    0x7ffa243e90d5 -[AGXG13GFamilyComputeContext dispatchThreads:threadsPerThreadgroup:] + 197
2   libmlx.dylib                  	       0x10b7876ae mlx::core::Arange::eval_gpu(std::__1::vector<mlx::core::array, std::__1::allocator<mlx::core::array>> const&, mlx::core::array&) + 1742
3   libmlx.dylib                  	       0x10b7833cf std::__1::__function::__func<mlx::core::metal::make_task(mlx::core::array&, std::__1::vector<std::__1::shared_future<void>, std::__1::allocator<std::__1::shared_future<void>>>, std::__1::shared_ptr<std::__1::promise<void>>, bool)::$_2, std::__1::allocator<mlx::core::metal::make_task(mlx::core::array&, std::__1::vector<std::__1::shared_future<void>, std::__1::allocator<std::__1::shared_future<void>>>, std::__1::shared_ptr<std::__1::promise<void>>, bool)::$_2>, void ()>::operator()() + 143
4   libmlx.dylib                  	       0x10afa2706 mlx::core::scheduler::StreamThread::thread_fn() + 518
5   libmlx.dylib                  	       0x10afa2953 void* std::__1::__thread_proxy[abi:v160006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void (mlx::core::scheduler::StreamThread::*)(), mlx::core::scheduler::StreamThread*>>(void*) + 67
6   libsystem_pthread.dylib       	    0x7ff80b07f1d3 _pthread_start + 125
7   libsystem_pthread.dylib       	    0x7ff80b07abd3 thread_start + 15

Thread 11 crashed with X86 Thread State (64-bit):
  rax: 0x000000007fffffff  rbx: 0x0000000000000000  rcx: 0x0000000000000010  rdx: 0x0000000000000000
  rdi: 0x0000000000000000  rsi: 0x0000000000000001  rbp: 0x00000003028c6c60  rsp: 0x00000003028c6bf0
   r8: 0x0000000000000002   r9: 0x0000600003da15f8  r10: 0x00007ffa4dc030d8  r11: 0x00007ff814d09672
  r12: 0x00007fc888350000  r13: 0x0000000000000000  r14: 0x00000003028c6c70  r15: 0x0000000000000000
  rip: <unavailable>       rfl: 0x0000000000000203
 tmp0: 0x0000000000000000 tmp1: 0x000000007fffffff tmp2: 0x0000000000000000

That doesn't look good. Which commit are you building on?
Also can you give some more details on your environment? E.g. OS, python version, ...

Sure, this is on the latest commit on main, python 3.11.6, macOS 13.5 on an M1 MacBook Air.
Let me know if there's any other info that might be useful. Happy to try running any test code to help narrow things down.

I'm not able to repro on my M1 but my situation is a bit different :. I'm on 14.2 and M1 Max.
Does running the test standalone cause the issue as well?
e.g. just running with TestArray.test_slice_negative_step

Digging deeper, I am also getting the same exception from a few of the the C++ tests, including autograd_tests, creations_tests, and most interestingly this simple test from metal_tests:
    a = array(std::initializer_list<bool>{});
    CHECK_EQ(all(a, Device::gpu).item<bool>(), true);

The first two made it seem like a logic issue with empty slices, but the common thread seems to be array::eval on an empty array. Something that basic should be easily reproducible which points to something specific to my machine, but I have no idea what it could be.

Wow, that's interesting..
Can you try running some of those tests standalon? Like just the test that fails? (Comment out the rest or something). I'm really curious about:

Is it reproducible consistenly
Does it involve some state being corrupted from other tests or is it really just that test having issues..

Debugging just the test metal reduce test case it is reliably hitting a divide-by-zero in reduce due to thread_group_size (as well as in_size and mod_in_size) being 0.

Cool, thanks for finding that! That looks like an easy fix now that you narrowed it down. Interested in sending a PR for it?

I added an early-exit to reduce which allowed the metal tests to pass, but now I'm seeing more failures from ops_tests (in addition to autograd and creations mentioned above). That, plus the fact that these tests are passing on your machine, makes me think there's some deeper issue here.
The common thread is that all of these failures are from operations on empty arrays. It seems surprising the answer would be adding checks for length == 0 all over the place, but I'm still unfamiliar with the library internals.

added an early-exit to reduce which allowed the metal tests to pass

Rather than an early exit, I was thinking to check if there is a zero in the denom and set the thread group size to zero in that case.

That, plus the fact that these tests are passing on your machine, makes me think there's some deeper issue here.

This is very strange to me as well...

It seems surprising the answer would be adding checks for length == 0 all over the place, but I'm still unfamiliar with the library internals.

No that doesn't seem like a good idea. Most of our primitives can handle 0 sized inputs.

@ccostes There is definitely a divide by zero. The fact we don't get an exception makes me think you are using a different compiler as it is generally undefined behavior / compiler specific. I can get the divide by zero error if I add:
add_compile_options(-fsanitize=integer-divide-by-zero)
link_libraries("-fsanitize=integer-divide-by-zero")

@ccostes could you check my PR and see if it fixes your issue? I didn't see any other instances where we divide by integer 0.

I think I found the problem: Rosetta! When building I didn't notice the following:
-- Building MLX for x86_64 processor on Darwin
CMake Warning at CMakeLists.txt:33 (message):
  Building for x86_64 on macOS is not supported.  If you are on an Apple
  silicon system, make sure you are building for arm64.

I had iterm set to run with Rosetta, but even when unsetting that and verifying that uname -m returns arm64 (where it was x86_64 previously) cmake is still reporting that it is building for x86_64...
% uname -m
arm64
build % cmake ..
-- Building MLX for x86_64 processor on Darwin
CMake Warning at CMakeLists.txt:33 (message):
  Building for x86_64 on macOS is not supported.  If you are on an Apple
  silicon system, make sure you are building for arm64.

I'm having a similar issue when running tests from autograd_tests.cpp.
I follow your suggestions @ccostes, but I already have my terminal running without Rosseta
% uname -p
arm

And homebrew running over ARM build
% brew config
HOMEBREW_VERSION: 4.2.3
ORIGIN: https://github.com/Homebrew/brew
HEAD: b3751bca8c4a3c76107d5aa3b75b81db93cf4bb6
Last commit: 3 days ago
Core tap JSON: 11 Jan 03:57 UTC
Core cask tap JSON: 11 Jan 03:57 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 14.2.1-arm64
CLT: <IP_ADDRESS>.1.1700200546
Xcode: 15.2
Rosetta 2: false

When I run the build command
% cmake .. && make -j
-- The CXX compiler identification is AppleClang <IP_ADDRESS>00100
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building MLX for x86_64 processor on Darwin
CMake Warning at CMakeLists.txt:33 (message):
  Building for x86_64 on macOS is not supported.  If you are on an Apple
  silicon system, make sure you are building for arm64.
.....

And the tests raise and exception mlx/tests/autograd_tests.cpp:724: FATAL ERROR: test case CRASHED: SIGFPE - Floating point error signal

Yea I don't know if the Rosetta thing in terminal actually matters, I'm having doubts about that now
But I spot your problem:
-- Building MLX for x86_64 processor on Darwin
CMake Warning at CMakeLists.txt:33 (message):
  Building for x86_64 on macOS is not supported.  If you are on an Apple
  silicon system, make sure you are building for arm64.

You are building for x86 for some reason.
Could you do which cmake and see what you get?

Thanks in advance for the time to answer me 🙏🏽
% which cmake
/usr/local/bin/cmake

I also reinstall XCode Command Line Tools and XCode Editor as well but the error continue

That's the x86 brew cmake installation. Might just need to brew install cmake again.
On Thu, Jan 11, 2024 at 12:43 PM Jhenner Tigreros @.***>
wrote:

Thanks in advance for the time to answer me 🙏🏽
% which cmake
/usr/local/bin/cmake
I also reinstall XCode Command Line Tools and XCode Editor as well but the
error continue
—
Reply to this email directly, view it on GitHub
https://github.com/ml-explore/mlx/issues/338#issuecomment-1887931715,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAN6EBAS24LV2VFGCIQPMQLYOBFF5AVCNFSM6AAAAABBJIOVOWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBXHEZTCNZRGU
.
You are receiving this because you were mentioned.Message ID:
@.***>

I install cmake from brew and execute the cmake command and get the same output.
% file /opt/homebrew/bin/cmake
/opt/homebrew/bin/cmake: Mach-O 64-bit executable arm64

% /opt/homebrew/bin/cmake ..
-- Building MLX for x86_64 processor on Darwin
CMake Warning at CMakeLists.txt:33 (message):
  Building for x86_64 on macOS is not supported.  If you are on an Apple
  silicon system, make sure you are building for arm64.
....

My hombrew installation is also arm64

% brew config
HOMEBREW_VERSION: 4.2.3
ORIGIN: https://github.com/Homebrew/brew
HEAD: b3751bca8c4a3c76107d5aa3b75b81db93cf4bb6
Last commit: 3 days ago
Core tap JSON: 11 Jan 03:57 UTC
Core cask tap JSON: 11 Jan 03:57 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 14.2.1-arm64
CLT: <IP_ADDRESS>.1.1700200546
Xcode: 15.2
Rosetta 2: false

Can you share the output of clang -v and g++ -v ?

Sure,
% clang -v
Apple clang version 15.0.0 (clang-15<IP_ADDRESS>.5)
Target: arm64-apple-darwin23.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

% g++ -v
Apple clang version 15.0.0 (clang-15<IP_ADDRESS>.5)
Target: arm64-apple-darwin23.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Lol what is going on !!!

I have to read more about what triggers this flag CMAKE_HOST_SYSTEM_PROCESSOR as we clearly do not understand it well enough.

On macOS, the value of uname -m is used by default. However, since this might vary based on whether you're using x86 or ARM CMake, version 3.19.2+ will use the value of CMAKE_APPLE_SILICON_PROCESSOR (either CMake or environment variable) instead, if it is set. It also normalizes Power Macintosh to powerpc.

https://stackoverflow.com/questions/70475665/what-are-the-possible-values-of-cmake-system-processor

Can you try compiling with:
env CMAKE_APPLE_SILICON_PROCESSOR=arm64 /opt/homebrew/bin/cmake ..
make -j

I was reading a bit about this last night, but does not find any solution to the problem. I tried to reinstall all my dependencies but doesn't work, also I try to compile with the default bash terminal.

Can you try compiling with:
env CMAKE_APPLE_SILICON_PROCESSOR=arm64 /opt/homebrew/bin/cmake ..
make -j

Gives me the same output related to building the code on x86 🤔 . If I force set env variable set(CMAKE_HOST_SYSTEM_PROCESSOR "arm64) in the CMakeLists.txt config file, it works
% cmake ..
-- Building MLX for arm64 processor on Darwin
-- Building METAL sources
-- Building with SDK for macOS version 14.2

-- Downloading json
-- Using the multi-header code from /Users/jhennertigreros/Documents/Personal/Code/mlx/build/_deps/json-src/include/
-- Accelerate found /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/System/Library/Frameworks/Accelerate.framework
CMake Deprecation Warning at build/_deps/doctest-src/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Configuring done (10.2s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/jhennertigreros/Documents/Personal/Code/mlx/build

but the building process got some errors.
% make -j
/Users/xxxx/Documents/Personal/Code/mlx/mlx/backend/accelerate/softmax.cpp:78:3: error: unknown type name 'int16x8_t'; did you mean 'int16_t'?
  int16x8_t epart = vcvtq_s16_f16(ipart);
  ^~~~~~~~~
  int16_t
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/sys/_types/_int16_t.h:30:33: note: 'int16_t' declared here
typedef short                   int16_t;
                                ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/mlx.dir/mlx/backend/accelerate/softmax.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/mlx.dir/all] Error 2
make: *** [all] Error 2

Digging in my current cmake --system-informationI found that the variable has the correct value
% cmake --system-information
....
CMAKE_HOST_SYSTEM_NAME "Darwin"
CMAKE_HOST_SYSTEM_PROCESSOR "arm64"
CMAKE_HOST_SYSTEM_VERSION "23.2.0"
...

Could you try running with make VERBOSE=1 just to see the actual compile commands. It will spit out a bunch of stuff, but just one of them would be interesting to see, something like:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DACCELERATE_NEW_LAPACK -DMETAL_PATH=\"/Users/awni/mlx/build/mlx/backend/metal/kernels//mlx.metallib\" -D_METAL_ -I/Users/awni/mlx/build/_deps/metal_cpp-src -I/Users/awni/mlx/build/_deps/json-src/single_include/nlohmann -I/Users/awni/mlx/build/_deps/gguflib-src -I/Users/awni/mlx -O3 -DNDEBUG -std=gnu++17 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -fPIC -MD -MT CMakeFiles/mlx.dir/mlx/linalg.cpp.o -MF CMakeFiles/mlx.dir/mlx/linalg.cpp.o.d -o CMakeFiles/mlx.dir/mlx/linalg.cpp.o -c /Users/awni/mlx/mlx/linalg.cpp

I just restarted my whole system and the cmake command start working without forcing the env variable in CMakeList file, I read a lot of stuff online my best guest is that there was some random cache over the CMAKE_APPLE_SILICON_PROCESSOR variable that set that as blank value (my cmake --system-information display as blank value before restarting) and then cascade the default value to x86_64 for the dependent variables, I suspect that some of my reinstallation attempts override the variable.
Thanks for the time dropped here @awni

Wow, the age old solution "restart" actually worked here. I'm dumbfounded, but glad it's fixed.


Change Report Issue button to reflect current status of the deprecation

From @eboracus on July 17, 2015 18:31
It would be nice if the report issue button behaved similarly to the Uncaught Error notification's report issue button. So if the error/issue has already been reported the button changes visually to inform the user, and they know it's not necessary to go and report it.
The button could still link through to the logged issue's page as it does now, but just give the information to the user without them having to click and open up the link to find out.

This is how it currently looks for a deprecation that has already been reported.
Copied from original issue: atom/deprecation-cop#61

From @50Wliu on July 18, 2015 15:33
This should have been fixed in #46.

From @izuzak on July 20, 2015 14:38
@eboracus Can you share the version of Atom you're using and the exact steps which reproduce the problem shown in the screenshot? (Assume I have only Atom installed, no packages.)

From @eboracus on July 20, 2015 23:8
This is with v1.0.2 and I can't reproduce the above in strict safe mode as I can only display the deprecation in question with the offending packages enabled. linter-clang in this case (which I guess needs linter to actually activate itself), with only these two packages installed I get the above screenshot. So at least from clean Atom the steps should be: install/load these two packages -> load atom -> click on deprecation message in status bar and the button displays as shown, thought the issue is reported.

From @izuzak on July 22, 2015 11:32
Ahhh, thanks for clarifying. I totally misunderstood your report -- I thought you were saying that existing issues were not detected correctly.
Yeah, the "Report issue" button checks for existing issues when clicked, not before that. I guess it would be nice if the behavior matched the Notifications package. Gonna add the "enhancement" label to this :+1:

I'm looking for a way to contribute to the project, I found this interesting. I have not contributed to Atom before, but think I might be able to add this enhancement. Unless there is some reason not to, I jump right on it. Thoughts?


Service Fabric runtime is not reclaiming unused memory from Actor Service Instance

I am running this service fabric application in On-Premises Service fabric cluster and used non persistent actors for execution only, initially actor instance's used memory is just few MB.
One request creates one actor in any one partition, and for processing of one request Memory increases 200MB-250MB during execution of actor as it works with multiple files, and after execution is finished I have deleted the actors.
Expected Behavior
As I am passing new ActorGarbageCollectionSettings(10, 2) Service Fabric Runtime should claim the used memory after IdealTimeout which is sepecified in above code and instance memory size should shrink again to few MB as there is no active actors.
Current Behavior
Used memory is not claimed sooner by runtime it takes long time (5min-50min) to release memory, but I can see there is no in-active actors by querying the partitions, when multiple actors are created
actor instance size is keeps increasing and in just couple of day, it's generate Memory Out of exception. Sometime VM also crashed automatically.
Steps to Reproduce

During actor service registration I have passed ActorGarbageCollectionSettings = new ActorGarbageCollectionSettings(10, 2)
In actor class I used attribute [StatePersistence(StatePersistence.None)]
After execution is finished, I have deleted it

Task.Run(() =>
                        {
                            actorObject.ExecuteGrainAsync(requestId, jsonModel).ContinueWith(async (t) =>
                            {
                                await GrainFactory.DeleteActor(actorObject.GetActorId(), "Workflow", CancellationToken.None);
                            });
                        });

Context (Environment)

It's starts by slowing down the entire processing of actors.
Actor generate OutOfMemoryException during execution.
After few hours VM is crashed because of low memory in VM.

Service Fabric Runtime and SDK Version :
7.0.457.9590 and 4.0.457.9590
Operating System :
Windows Server 2019

Cluster Size :
Dev-Cluster with 5 VMs of 8 GB RAM
Possible Workaround
Till now, VM restart is the only solutions for me.

sorry for late response, but is this still occurring? Latest version is now 7.2.445.9590 as of this comment and would like to know if you still see it. thanks!

sorry for late response, but is this still occurring? Latest version is now 7.2.445.9590 as of this comment and would like to know if you still see it. thanks!


The enter keys getting stored as  instead of , i.e., without end tag

Jodit Version:  3.2.xxxxx
Browser:  All
OS:  All
Scenario

When we use <Enter> for new lines,
 tags will get introduced, instead of
 or

 tags with end tag format.

Expected behavior:

 or

Actual behavior:

It depends on the doctype of your page and not on Jodit.


[CMT-520-823] Update 2021-09-12-Yearn-Finance-Newsletter-46.md

Description

Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context.

This pull request ...
Fixed issue

Please indicate the fixed issues with this exact format Fixes #232 where 232 is the number of the issue. This will trigger an auto-close if the issue when this PR is merged.
Supported keywords:
Fixes #1,#2,#3
close #1, #2, #3
fix #1 #2 #3
resolve #1,#2 #3
Resolves: #1,#2,#3
closed : #1, #2, #3

Fixes #(issue)
Type of change

Please delete options that are not relevant and check the box.

[ ] Add a new article/page
[ ] Fix a Typo
[ ] Add a new translation
[ ] Other

Resources

Any screenshots, links or relevant resources to explain better the changes.

@qosmonot  Re-submitted in the correct branch. I think you can close this now!


Delete superfluous SDK/communication/ci.yml file

SDK/communications should not have a service directory level ci.yml file. That was removed as part of the PR that created separate pipelines for each library under SDK/communication. Another PR, at the end May, added the SDK/communication/ci.yml file back with azure-resourcemanager-communication as the target. The result here is that we now have two pipelines building azure-resourcemanager-communication and there should only be one. The SDK/communication/ci.yml should not exist. After this PR gets merged, I'm going to have to delete the internal and CI pipelines that were created when the CI.yml file was added back.

@weidongxu-microsoft looks like this got added for azure-resourcemanager-communication in https://github.com/Azure/azure-sdk-for-java/pull/29059. We will need to figure out how we want to split this pipeline as the other communication pipelines have been split into the ci.yml files under the package directory itself. We probably want to follow that same pattern for this library.

I'm going to override check enforcer, there's nothing to run for this PR as I'm deleting the ci.yml

Sure. I will fix the script.


Dupe history entries not deduped properly

In the debug console, evaluate something, then 1+1 3 times.
Press up, get 1+1
Press up again, get 1+1 again
Press up again, get the previous history entry

Seems like it always reduces down to 2 entries, or there might be something else weird going on

We are de-duplicating history entries which makes sense for me.
This is designed behavior
What is the use case of seeing 1 + 1 3 times in history?

The bug is that I see it twice, when I should see it once

@roblourens I can not repro.
What are you doing differnetly than me in this gif
Please note that I pressed up only two times at the end. Thus 1 + 1 is only once in history

Hmm, extra steps

Execute things as above
Press up to go through history, it works
Press down to go back
Press down a couple extra times - I did this because I was expecting to get back to an empty input if I press down
Then, I press up on 1+1 and nothing happens, it's still on 1+1

Ok, the issue is when you reach the end of history up / down take an extra hit to get the previous or the next one.
Duplication is not related. Renaming this issue.
I am open for PRs that fix this
Code pointer https://github.com/microsoft/vscode/blob/0687d65b30a752cef32490bca7ca85f4b41015b2/src/vs/workbench/contrib/debug/browser/repl.ts#L235
Probably the historyNavigator has an issue at the end of history

Hello. I would like to contribute on this if you are open.
I will submit a PR as soon as I fix it :)

To verify:

Start debugging, open debug console
Evaluate 1, then evaluate 2
Make sure pressing up gets you all the way back to the end of history in the debug console input
Make sure pressing down gets you immieadly to the previous history element. Thus no duplicatino happens


[FLINK-36326] Fix auto scan newly-added table after restart

This closes FLINK-36326 by omitting duplicate binlog split update requests in MySqlSourceEnumerator. Cherry-picked from @ruanhang1993's original commit.

cc @qg-lin @ruanhang1993

According to feedback from community users, cherrypicking this pr has indeed solved the problem.


MODEL TRAINING AND EVALUAING

[ ] adding config yaml
[ ] adding configurations in config entity for paths
[ ] configuration file
[ ] components
[ ] pipeline
[ ] training started
[ ] training finished
[ ]


How do you reading user document when logged in and skip if not

Hi guys,
This might be a simple on and I am not professional in ReactJS.
Q: In my home page I am reading, the user document for the logged in user. If the user is logged in I will display some information from it. If not, that section is hidden.
const [user, loading, error] = useAuthState(auth);   const [value, docLoading, docError] = useDocumentOnce(firestore.doc('/users/' + user.uid), { 		snapshotListenOptions: { includeMetadataChanges: true },  	});
It throws an error for not logged in case and if I check the user value, then throws an error: "React Hook "useDocumentOnce" is called conditionally. React Hooks must be called in the exact same order in every component render"
I can create a component/separate page might be a solution.
Is there a better way to do this?

Hi, I think you can make use of the fact that you can pass a null value as document reference here. You might want to try the following:
const [user, loading, error] = useAuthState(auth);
const [value, docLoading, docError] = useDocumentOnce(user ? firestore.doc('/users/' + user.uid) : null, {
    snapshotListenOptions: { includeMetadataChanges: true },
});

Perhaps it would also work with:
const [user, loading, error] = useAuthState(auth);
const [value, docLoading, docError] = useDocumentOnce(user && firestore.doc('/users/' + user.uid) , {
    snapshotListenOptions: { includeMetadataChanges: true },
});

Thank you, @mauriceackel. That worked.

I wanted to bring this issue back to life again to suggest a new feature...
So conditional loading is something that would come in hand, like saillcemail mentioned, in case a user is not logged in, or a specific data is not loaded yet... Your approach works, but feels kinda like a hack, having these ternaries in the document reference...
I've worked with React Query in the past, and they have a pretty handy option to not do an API call in case a condition is not met, it's an option called enabled.
I think it would be an easier way to set it up, if we had the same option for the document and collection hooks, something like:
const [user, loading, error] = useAuthState(auth);
const [value, docLoading, docError] = useDocumentOnce(firestore.doc('/users/' + user.uid) , {
   enabled: !!user
});

What do you think? If you're ok with this, I'd be happy to open a PR with an implementation, add some tests and update the docs in case you don't have time for it.

Hey @mauriciosoares I just quickly scanned over your suggestion and I just wanted to mention that with this solution there would potentially still be typescript issues. Although they might be solved by simply using the ‘?‘ operator, I still think that my initial approach is valid.
If you don't like using a ternary in the document reference, simply use a useMemo hook to achieve the same functionality in a perhaps "cleaner" way...
Cheers, Maurice

@mauriciosoares, as @mauriceackel says, the example you give wouldn't work when the user is not defined as user.uid would throw an error so you would have to protect against this with a ternary, or similar, anyway, so in that instance you'd just be moving the same logic elsewhere in your code.
Whilst the React Query approach is another way of doing things, I'm loathe to introduce additional complexity to the codebase and feel that the use of a null / undefined document reference is a simpler take on the same thing.


Rename nextclade2 to nextclade

Issue: https://github.com/nextstrain/ncov/issues/968
Sister PRs:

https://github.com/nextstrain/docker-base/pull/60
https://github.com/nextstrain/ncov/pull/969

Note that CI was passing before I renamed nextalign2 to nextalign, since the Docker image used by CI has nextalign2. The CI should pass again once we've merged the update to the Docker base image.


mpvScripts.dynamic-crop: 0-unstable-2023-12-22 -> 0-unstable-2024-06-22

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for mpvScripts.dynamic-crop is: Script to "cropping" dynamically, hard-coded black bars detected with lavfi-cropdetect filter for Ultra Wide Screen or any screen (Smartphone/Tablet).
meta.homepage for mpvScripts.dynamic-crop is: https://github.com/Ashyni/mpv-scripts
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes

Compare changes on GitHub

Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 0-unstable-2024-06-22 in filename of file in /nix/store/fsk4z122r2k4py62jqhgfw14hsrrd4xm-dynamic-crop-0-unstable-2024-06-22

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath

mpvScripts.dynamic-crop

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/fsk4z122r2k4py62jqhgfw14hsrrd4xm-dynamic-crop-0-unstable-2024-06-22 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A mpvScripts.dynamic-crop https://github.com/r-ryantm/nixpkgs/archive/6a1b92ffc4e9566b89139f0f18544d7705e3bba6.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/6a1b92ffc4e9566b89139f0f18544d7705e3bba6#mpvScripts.dynamic-crop

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/fsk4z122r2k4py62jqhgfw14hsrrd4xm-dynamic-crop-0-unstable-2024-06-22
ls -la /nix/store/fsk4z122r2k4py62jqhgfw14hsrrd4xm-dynamic-crop-0-unstable-2024-06-22/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review --extra-nixpkgs-config '{ allowInsecurePredicate = x: true; }' run on x86_64-linux 1

1 package built:

mpvScripts.dynamic-crop

Maintainer pings
cc @iynaix for testing.

@NixOS/nixpkgs-merge-bot merge


Update ledger.

This reverts the change to the incremental stake computation, which was
causing performance regressions. As such, the on-disk state has again
changed.

bors merge


Dynamically change items in animated tab bar

Hi everyone,
I'm developing an app that provides different UIs based on the kind of user that is logged in, so based on that the tab bar must show different items (actually the items are always the same, but depending on the user type the bar must show all items, two or three of them); I've tried to dynamically modify the items array simply using the remove(atIndex: Int) swift function, but the app crashes as that kind of operation is not allowed. I even tried to work with the overridden setViewControllers function, but it appears to not be called. Is there a way to dynamically edit the array of items/controllers used by the animated tab bar?
Thank you in advance for your help

mocc a chivemmuort putivn risponnr ind e fess re mamm vost

Hi @luibo
Please check this project, is this what you wanted?
https://github.com/khoren93/SwiftHub

I created the branch where I remove the items and it works https://github.com/Ramotion/animated-tab-bar/tree/tests/remove-tabs


Add logging scope for auth flows

We can scope help diagnosing authentication issues by correlating multi request auth flows.
/cc @PinpointTownes

Sounds like a very good idea . For that, I presume you'd store a correlation identifier in the AuthenticationProperties of the correlation/anti-forgery cookie?

@PinpointTownes yep!

Closing because we don't feel this would add sufficient information to aid in most debugging scenarios that we've seen people run into.


Dequantization

Hi, thank you for sharing the coding.
Could you please explain why you dequantize the values after quantization?
https://github.com/linyang-zhh/FQ-ViT/blob/16122ee7ea33e80aed3edd29cfebb3ab2ce2cb69/models/ptq/quantizer/base.py#L46

@ebsrn
Hi! In order to ensure the flexibility of future work (e.g. supporting training or fine-tuning), we use FakeQuantization. More information can be found in this link and this paper.

Thank you.

Hi again,
I'm trying to do the inference with quantized weights. For this, I deleted the following line. Is this a correct approach? When I do this, I see that the output of the layer before the classification layer consists entirely of nan values.
https://github.com/linyang-zhh/FQ-ViT/blob/16122ee7ea33e80aed3edd29cfebb3ab2ce2cb69/models/ptq/quantizer/base.py#L46

@ebsrn Hi,
quant and dequant are the standard and necessary steps in quantization and you can't remove any of them.
These steps are introduced in the above-mentioned documents, and Figure. 6 in this paper. I hope you could read these articles carefully, in order to enhance the understanding of quantization.


Remove scope definitions from Scopes.md and logout from IMS.md [REVIEW]

Approved by Ovidiu Dobroiu on slack.


Distinguish the random feature and tensor function

Look ahead far enough to choose correctly between the tensor function 'random(tensor-type)'
and the scalar feature 'tensor(literal'"random" feature.
This also relaxes Context to allow arguments (to allow testing).
@lesters please review

👍


Changed guidelines to support functional naming schema

Fixes #129, #132

This needs to be redone in AsciiDoc format.

Not for now, postponed.


Build on windows

There's a gyp generator for creating a MS Visual Studio project, but I can't test / verify that without a copy of windows. halp

I'm trying to make it work on windows!
The first obstacle is to run djinni. How about to replace run_djinni.sh with build.gradle?
Just installing cygwin unfortunately doesn't make it work due to cygwin paths /cygwin/c/.../mx3/, java just doesn't understand them.

Ya, that sounds great.  I don't know a ton about gradle but I'd be happy to merge any PR that even makes incremental progress.

I don't know gradle either, but it seems pretty simple! Just read first chapters of their free book and everthink becomes clear. Actually I would prefer to remove Makefile completely as it still doesn't fully work on windows.
Regarding Visual Studio 2013.
gyp generates solution and VS can open if flawlessly. However solution also includes libxm3_objc, libmx3_jni that are meaningless for windows build.
The most hard thing to build is sqlite wrapper as it uses ref-qualifiers (&& in the end of methods), which are not supported yet in vs2013. I've given up to fix build after two hours or so..

Well, the ref qualifiers were simply an optimization in the sqlite code (which has become my pet part of the project).  If it doesn't work on windows, lets just remove the && methods.  You can still accomplish the same performance by calling move_string or move_blob if you really care about that perf.
I also agree to moving away from a Makefile based root build, gradle seems to be a great option after looking at your other PR.

I've given up to build it under vs2013 once again :-( too much errors. Mostly because some C++11 features are not supported.
I've tried vs2015 CTP6 preview and the only reason it fails to compile is optional.hpp. I've inserted my stub implementation for optinal, did some minor hacks here and there and it compiles. So I think it's better to wait for 2015 studio, as fixing compilation for vs2013 is just waste of time.
BTW, why didn't you choose optional from Boost? It should compile everywhere.

Ah, thanks for the help anyway.  I'll add a note to this that VS2015 is what we want to target.
I chose std::experimental::optional basically because it had a chance at inclusion into C++14 (it didn't make it) but I presume it will be added into C++17.
Since it was all but finalized, I wanted the code to be future-proof.

Is this project still alive?

It's an example of dropbox/djinni usage, so you don't should expect much activity here.

@kepkin I thought it is a project of cross platforms(mobile times 3) application development.

It is a showcase app / example.  I don't anticipate any further development by me, since I am currently out of the cross-platform mobile space, and therefore won't be continuing to discover "state of the art" to share here.


Bug: Author should be white in dark mode

Description
In Dark mode the color of "Authors" should be white.
Screenshots

What browsers are you seeing the problem on?
Firefox
Ready to Work?

[X] I want to work on this issue

Assign me so that i can work on this .

Assigned to you


[React Scan] Failed to load. Must import React Scan before React runs.

We use the script tag version. This appears "[React Scan] Failed to load. Must import React Scan before React runs." in our Next JS App Router project.

Same here, running with npx react-scan@latest localhost:3000
It worked on the same site a few days ago 😩

@henryzhang03 is react-scan not working for you at all? Or is the log there, but it still works?

@henryzhang03 is react-scan not working for you at all? Or is the log there, but it still works?

Works but log is there

Usually this is the cache (either the dev build or the browser) lagging behind, have you tried deleting the cache and/or performing hard refresh?

yupp doesnt work

Same here, running with npx react-scan@latest localhost:3000
It worked on the same site a few days ago 😩
Edit: For me it works with the script tag.

how??

Is Preact supported by react-scan?
I've tried

import scan and config manually
add script tab before any other scripts
npx react-scan localhost
in my Preact 'hello world' project and keep getting this error.


grunt nodeunit:only:test.js

:+1:

@johnnyman727 that failure (see travis) is reproducing locally. I haven't bisected and I would guess this introduced it: https://github.com/tessel/t2-cli/commit/389916d2d319f69d4716dd3feccb29cae7eb105e

Nope, it was this: https://github.com/tessel/t2-cli/commit/466b6fc08692e2e82e09dd5ec046e464a9762575 my bad!


[$500] Payment issue for #36520

https://github.com/Expensify/App/issues/36520
Creating this to make a new Upwork issue

... Okay then, fine. I'll create one manually 😭


Ensure client side navigation when following a rowlink in a table

Row links leverage window.location, this leads to no pre-fectching and poor loading experience.
https://github.com/evidence-dev/evidence/blob/951a7aa3fcf336d2b16aa3a06a78d81fc66eeb27/packages/ui/core-components/src/lib/unsorted/viz/table/TableRow.svelte#L27

@mcrascal I'd like to take a deeper dive into how we implement table row links.
After some googling, it seems clickable table rows are somewhat of an antipattern because:

Its not easily accessible

Without an <a>, screenreaders don't know its clickable (our current problem)
An <a> tag must go in a table cell, so we either have only one cell clickable, or a bunch of anchors for every cell

With <a> tags, the text is no longer highlightable for copy/paste, which seems very useful for a DataTable

I think the direction I'd like to go is having a dedicated column for the link:
Either an automatically added one:
<DataTable
  data={[
    {
      country: "United States",
      population: 333300000,
      wikiLink: "https://en.wikipedia.org/wiki/United_States",
    },
    {
      country: "Mexico",
      population: 127500000,
      wikiLink: "https://en.wikipedia.org/wiki/Mexico",
    },
    {
      country: "Canada",
      population: 38930000,
      wikiLink: "https://en.wikipedia.org/wiki/Canada",
    },
  ]}
  link="wikiLink"
/>

Country
Population

United States
333,300,000
See more

Mexico
127,500,000
See more

Canada
38,930,000
See more

Or user-specified:
<DataTable
  data={[
    {
      country: "United States",
      population: 333300000,
      wikiLink: "https://en.wikipedia.org/wiki/United_States",
    },
    {
      country: "Mexico",
      population: 127500000,
      wikiLink: "https://en.wikipedia.org/wiki/Mexico",
    },
    {
      country: "Canada",
      population: 38930000,
      wikiLink: "https://en.wikipedia.org/wiki/Canada",
    },
  ]}
>
  <Column id="country" title="Country" link="wikiLink" />
  <Column id="population" title="Population" />
</DataTable>

Country
Population

United States
333,300,000

Mexico
127,500,000

Canada
38,930,000

What do you think?

Relevant blog post: https://adrianroselli.com/2020/02/block-links-cards-clickable-regions-etc.html#Update02

That pattern is already achievable with the link content type.
We already offer clickable rows, and users seem to prefer them over turning the first column into a link.
If it'd help with accessibility, I'd be open to adding a chevron type of indicator in a final column when rows are clickable, with screen reader text as the link target, but I don't think we can get away from offering the clickable row.
Alternatively, if we don't want to wrap things in an a tag, could we look into how to trigger svelte kit's pre-fetching behaviour on hover of table row.

This implementation seems very good to me:
https://codepen.io/aardrian/pen/dyorWwr


Moved IsInPreviewContext into AssetUtility

Won't compiling still fail since it is a runtime class and is using the UnityEditor namespace?

The issue was that IsInPreviewContext() was in ProcessSceneObject.cs now it is in AssetUtility which is surrounded by #if UNITY_EDITOR.
The calls to IsInPreviewContext() are comming from ProcessSceneObjectEditor which is in a Editor Folder.
Should be fine right?


Few questions

Why do we need to monkeypatch estraverse? Can we not use babel's traversal mechanism which includes the es6 types?
Instead of doing a parent search, why don't we just make jscs a dependency of babel-jscs, and the loc of jscs could be found via require.resolve('jscs')? There's room for trouble since jscs will depend on babel-jscs which depends on jscs. But from my local tests, I haven't seen an issue yet.
What if we just pull in babel's types into tree-iterator.js and extend our custom supplied keys to estraverse? From my local tests, that plus the use of jscs within babel-jscs gets us closer to a stable integration (some tests still fail, but there's progress).

Will ask more questions as I continue to tinker.

I guess firstly I'l just say I didn't do a lot of thinking of any improvements and it's mostly just babel-eslint and then changed some things to work for jscs - it's possible some things are only used in eslint and not required for jscs (I removed stuff like escope tracking, etc).

Yeah the only reason to monkeypatch is to do assign(estraverse.VisitorKeys, t.VISITOR_KEYS); in tree-iterator.js

There's room for trouble since jscs will depend on babel-jscs which depends on jscs

Yeah I don't know other than what you described. I accidentally added eslint to the dependencies and got an issue but I'm not sure if it's the same https://github.com/babel/babel-eslint/commit/8815982b2b55ea6ec0f498dfd4af119b339f50ba

Are you saying we just pull in the newer types into tree-iterator in jscs itself? I guess we did that for JSX already. Yeah then we wouldn't need the whole monkeypatch method and no dependency on that.

I think we'll still need acorn and the esprima to acorn work for a parser that supports the new node types.
In regards to the monkeypatch, I'd rather not hardcode the new visitor keys into jscs (we'd then have to maintain the list), but pull in babel-core and lodash.assign the keys into our tree iterator.
Im also not sure (yet) whether we need the comment modifications provided here.

Yeah acorn-to-esprima will be needed. There's an issue to move it out to a separate repo too (https://github.com/babel/babel-eslint/issues/24) if we think that's a good idea.
I mentioned in the other issue https://github.com/jscs-dev/node-jscs/pull/1446 that importing babel-core might make jscs bigger? If that's not the case or not a big deal that sounds good.
I think we need the comments since esprima.parse gives you the ast including the comments unless we are doing that separately? We probably want to parse once though.

There's an issue to move it out to a separate repo too (babel/babel-eslint#24) if we think that's a good idea.

For sure.

I mentioned in the other issue jscs-dev/node-jscs#1446 that importing babel-core might make jscs bigger?

I personally don't care about the download size. Alternatively, can babel just move its types definition to another module like babel-types?

I think we need the comments since esprima.parse gives you the ast including the comments unless we are doing that separately?

You're right. We need it.
Will close and ping when I get closer to making the jscs test suite stable with babel-jscs.


Is rickshaw dead?

What happened to rickshaw? The development seems to have stopped, no comments/reviews/merges of pull requests.
Is @shutterstock still interested in being the maintainer? Are there any other people interested in taking over the maintainership?

:+1: I'd be interested in hearing about the current state too.

Me too.

Adding some recently active developers working on forks: @intratec @loop-recur @dimitris444 @stuartnelson3 @ripjar

+1

+1

+1

+1

+1

+1

+1 to @grobie 's questions. Is there a verdict?

Seems very clearly dead, everyone. I'm sure if that changes this'll update.

What are some alternatives that folks like?

+1

+1

+1

+1

+1

I've started to use Chart.js instead. It seems to do most things, but I had to use a plugin for a scattergraph, and I think that multiple y-axes are only available in v2 (currently beta).

+1

+1

https://github.com/plotly/plotly.js was just open sourced. It does seem that this library isn't under active development anymore.

+1

+1

+1

😞


Prepopulation not working for create new link in associations drawer

In 2.6.5, I have a Select Box field with dynamic values and have "Display associations in entries table" enabled.
Clicking "Create New" in the associations drawer (see screenshot below) doesn't work properly – the relevant field isn't pre-populated. Passing the value (e.g 'Percy') in the query string instead of the id (16 in this case) does work – it seems that the prepopulation of the selectbox will only work with a value rather than an ID, but the association drawer is trying to use an ID?

The filter link is also incorrect in the same way:

Outside of the associations drawer things are working properly, as the value is passed rather than the ID, e.g:

This is resulting from a very simple setup so hopefully easily to reproduce!

Hum thanks @johnpuddephatt I'll look it up ASAP.

Re #2650

@johnpuddephatt this has been fixed in 2.7.x !


Bug: CameraPlus patch breaks when CameraPlus isn't there

Description
I swear I tested for this, but it seems while testing 1.4 I wound up getting this issue.

Fixed in #177


Fix alert styles

Currently, there's no sane way to add a.btn to alert. We broke this with custom styling in alerts.less
Current:

Original (without alerts.less):

We need to check where and how is this used and then discuss the fix.


What is x and y in NativeImageCropper.cropRect

i am using the camera library to take a photo I get an XFile.
And i want to crop a square with a width equal to 70% and in the center of the image.
i started with topLeftX and topLeftY but when i crop, it returns for me the wrong image.
Could you expand for me how can i use the function cropRect.
This is my code:
Future<Uint8List?> cropImage(XFile image) async {
    final imageBytes = await image.readAsBytes();
    final originalImage = await decodeImageFromList(imageBytes);

    final imageHeight = originalImage.height;
    final imageWidth = originalImage.width;

    final squareSideLength = (imageWidth * 0.7).toInt();
    final centerX = imageWidth ~/ 2;
    final centerY = imageHeight ~/ 2;

    final topLeftX = centerX - (squareSideLength / 2);
    final topLeftY = centerY - (squareSideLength / 2);

    final bottomLeftX = centerX - (squareSideLength / 2);
    final bottomLeftY = centerY + (squareSideLength / 2);

    final bottomRightX = centerX + (squareSideLength / 2);
    final bottomRightY = centerY + (squareSideLength / 2);

    final topRightX = centerX + (squareSideLength / 2);
    final topRightY = centerY - (squareSideLength / 2);

    final croppedImage = await NativeImageCropper.cropRect(
      x: topLeftX.toInt(),
      y: topLeftY.toInt(),
      width: squareSideLength,
      height: squareSideLength,
      bytes: imageBytes,
    );

    return croppedImage;
  }

Hi @minh-dai,
could you please provide more details about the problem you'd like me to elaborate on? Additionally if you can provide an example of the original image and the expected image, it would help me to understand your problem better.
The only problem I see in your code is that you use squareSideLength for both width and height, which could lead to unexpected results if the original width is greater than the height (probably the plugin should throw an exception for that, I will note it for now).
Here is a simplified example:

original image (2000x1000)
crop image (70% width -> 1400x1400)
result image (1400x1000), height cannot be greater than the original height

@minh-dai It should be that the image automatically rotated, causing the height of the image to not match your y. My solution is:  https://github.com/cosee/native_image_cropper/issues/82

@minh-dai Can you try out the new version 0.6.0 and check if your issue still remains?


Completion Percentage PLEASE! <3

Please, this program is awesome, but it miss a completion percentage! Please <3

Thanks for the suggestion. It's actually unreasonably painful to implement this, especially when supporting wordlist streams piped from stdin. So I'm afraid the answer will be "no". Sorry.


[Story] As a filer, I want to be able to confirm POC information for my FI before Sign and Submit

Epic
Epic issue includes overview, complete list of user stories, technical and content requirements, user testing task ideation, and current design mock-ups.
Add link to the parent epic
User story
As a filer, I want to be able to confirm POC information for my FI before Sign and Submit, then I will be able to confirm that my information is correct.
Acceptance criteria
Given a user is preparing to  sign and submit their data, when they progress toward the final page they will see current POC information then they can confirm and edit this information.
Technical tasks
Developers should create technical tasks and add links (below) prior to sprint planning.
Front end

[ ] Task (link)
[ ] Task (link)

Back end

[ ] Task (link)
[ ] Task (link)

Context

@angelcardoz @sthomas93
Should a filer be able to provide, confirm, or do both? Will the point of contact information live with the filing data as opposed to within the financial institution profile data? For the confirm is it a review or do they need to check a box or something to indicate that they did a review and are confirming that they did that?
Do we need a user story for provide and a separate one for confirm?
Provide:
"As a filer, I want to be able to provide the point of contact information for my financial institution before I submit my filing, so that the CFPB or other regulator can contact my financial institution about my filing."
Confirm:
"As a filer, I want to be able to confirm the point of contact information for my financial institution before I submit my filing, so that I can ensure that my financial institution point of contact information is accurate."

@dan-padgett

@natalia-fitzgerald I think at this point it is "provide" since the sign and submit page is where they would confirm that it is correct (along with all the other information on the sign and submit page).

@sthomas93 @angelcardoz
What do you think of this change?
User story:
As a filer, I want to provide point of contact information for my financial institution prior to signing and submitting my filing, so that the CFPB or other regulators can contact my financial institution about my filing.
Short version:
Provide point of contact information for before signing and submitting

@angelcardoz @sthomas93
In today's backlog grooming follow-up we settled on adding a step to the lending data filing flow called "Provide point of contact". Can we go ahead and create an epic for that? We can then adjust this specific story to capture just the confirm point of contact information that happens at Step 5. Sign and submit. And we can capture the "Provide point of contact" under the other epic.
User story:
As a filer, I want to confirm the contact information for my financial institution prior to signing and submitting, so that the CFPB or other regulators can contact my financial institution about my submission.
Short version:
Confirm contact information for before signing and submitting
@dan-padgett

@natalia-fitzgerald @angelcardoz The epic for Provide point of contact can be found here and the epic for Provide type of financial institution can be found here.

Changed from "As a filer, I want to be able to confirm POC information for my FI before Sign and Submit, then I will be able to confirm that my information is correct" to "As a filer,  I want to review my point of contact  information, so that I can confirm my information is correct and proceed to finalizing my filing."

Tracking this work in this consolidated story:

https://github.com/cfpb/sbl-project/issues/260


Multi-microsub account issues

When you log in to multiple microsub accounts, the channels get mixed together because they don't seem to be fetched independently based on the currently active account

This issue won't exist in the new apps


Draft: [DAPHNE-#118] Documentation of DaphneDSL

In GitLab by @pdamme on Mar 18, 2022, 21:05
On this branch/MR, we're writing an initial documentation of DaphneDSL.
Closes #118 (once it's ready).

@pdamme
Are the missing parts of the documentation (Statements, Functions, File I/O) added soon?

Hi @RetoKrummenacher, continuing with this documentation is definitely on my todo list and I'll try to push this further now. Unfortunately, I cannot promise to finish it in the next few days...
In the meantime, I recommend having a look at the script-level test cases in test/api/cli/, which contain examples of almost all DaphneDSL language features that are already working. For instance, all kinds of statements can be found in test/api/cli/controlflow/*.daphne, user-defined functions can be found in test/api/cli/functions/*.daphne. A list of built-in functions can be found in src/parser/daphnedsl/DaphneDSLBuiltins.cpp, for the time being. In addition to those, there are some examples of small algorithms in test/api/cli/algorithms/ and scripts/.
And of course, if you have any specific questions, don't hesitate to ask them directly.

I will close this PR and reopen it in my own name (it was opened before the migration from GitLab).

Respectively, I will push it directly to main ;) .


Contain all display init logic within display.c

Supersedes #428. Not sure if the changes to display_get_config() are the right thing to do here.

@asdfugil could you please test this on an iDevice to make sure it didn't break anything?


Possibly a bug.

In [1]: %load_ext birdseye
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Input In [1], in <cell line: 1>()
----> 1 get_ipython().run_line_magic('load_ext', 'birdseye')

File ~/.pyenv/versions/3.10.4/lib/python3.10/site-packages/IPython/core/interactiveshell.py:2294, in InteractiveShell.run_line_magic(self, magic_name, line, _stack_depth)
   2292     kwargs['local_ns'] = self.get_local_scope(stack_depth)
   2293 with self.builtin_trap:
-> 2294     result = fn(*args, **kwargs)
   2295 return result

File ~/.pyenv/versions/3.10.4/lib/python3.10/site-packages/IPython/core/magics/extension.py:33, in ExtensionMagics.load_ext(self, module_str)
     31 if not module_str:
     32     raise UsageError('Missing module name.')
---> 33 res = self.shell.extension_manager.load_extension(module_str)
     35 if res == 'already loaded':
     36     print("The %s extension is already loaded. To reload it, use:" % module_str)

File ~/.pyenv/versions/3.10.4/lib/python3.10/site-packages/IPython/core/extensions.py:76, in ExtensionManager.load_extension(self, module_str)
     69 """Load an IPython extension by its module name.
     70
     71 Returns the string "already loaded" if the extension is already loaded,
     72 "no load function" if the module doesn't have a load_ipython_extension
     73 function, or None if it succeeded.
     74 """
     75 try:
---> 76     return self._load_extension(module_str)
     77 except ModuleNotFoundError:
     78     if module_str in BUILTINS_EXTS:

File ~/.pyenv/versions/3.10.4/lib/python3.10/site-packages/IPython/core/extensions.py:99, in ExtensionManager._load_extension(self, module_str)
     94             print(("Loading extensions from {dir} is deprecated. "
     95                    "We recommend managing extensions like any "
     96                    "other Python packages, in site-packages.").format(
     97                   dir=compress_user(self.ipython_extension_dir)))
     98 mod = sys.modules[module_str]
---> 99 if self._call_load_ipython_extension(mod):
    100     self.loaded.add(module_str)
    101 else:

File ~/.pyenv/versions/3.10.4/lib/python3.10/site-packages/IPython/core/extensions.py:151, in ExtensionManager._call_load_ipython_extension(self, mod)
    149 def _call_load_ipython_extension(self, mod):
    150     if hasattr(mod, 'load_ipython_extension'):
--> 151         mod.load_ipython_extension(self.shell)
    152         return True

File ~/.pyenv/versions/3.10.4/lib/python3.10/site-packages/birdseye/__init__.py:38, in load_ipython_extension(ipython_shell)
     37 def load_ipython_extension(ipython_shell):
---> 38     from birdseye.ipython import BirdsEyeMagics
     39     ipython_shell.register_magics(BirdsEyeMagics)

File ~/.pyenv/versions/3.10.4/lib/python3.10/site-packages/birdseye/ipython.py:13, in <module>
     11 from traitlets import Unicode, Int, Bool
     12 from werkzeug.local import LocalProxy
---> 13 from werkzeug.serving import ThreadingMixIn
     15 from birdseye.bird import PY2, Database
     16 from birdseye import server, eye

ImportError: cannot import name 'ThreadingMixIn' from 'werkzeug.serving' (/home/andrei/.pyenv/versions/3.10.4/lib/python3.10/site-packages/werkzeug/serving.py)

I tried uninstalling and then installing Werkzeug and Flask, but the same error is still happening.

Thanks for the report. Looks like installing werkzeug<2 should work. Wonder why no one reported this before.

Hey!, by the way. I looked into your profile. Futurecoder looks like a great project, and its a great vision you have.
I think this kind of work should have more visibility.
My respects.

Hey!, by the way. I looked into your profile. Futurecoder looks like a great project, and its a great vision you have. I think this kind of work should have more visibility. My respects.

Thanks, please share it with all your friends!
The fix for this bug has been released to PyPI.


matplotlib considered harmful

Yes it is me saying this... according to cProfile, matplotlib consumes an embarrassing amount of time to load itself. The result: every run, however irrelevant plotting might be for it, loads matplotlib and thus cannot run faster than a fixed minimal amount of time (on average).
These effects can be avoided by loading matplotlib only in plotting functions, not at the top of files. For example saving digraphs is independent of matplotlib, so only pydot suffices there. It seems that matplotlib may be entirely avoidable there, using some ipython magic for graphviz.
Also, tulip.__init__ loads every subpackage, which causes all of abstract and hybrid to be loaded, even if one only desires to work with discrete systems (e.g., with synth, interfaces, and transys).
Arguably, only hybrid systems work justifies loading abstract and matplotlib, because:

this is where matplotlib plotting capabilities are used
the time typically consumed by abstraction reduces the relative overhead of loading matplotlib.

To support "it is suggested that this convention..." above, I wrote the recommendation under Inline imports on the Drafts of code conventions page of the dev wiki.

All of the import lines in tulip/transys/export/__init__.py were commented-out and have been so for a while, so I deleted them in c8f821793035660b910e586cff625092193deb79